Re: Layout question - adding a class to a wrapper div

2013-12-06 Thread Dave M.
Great. thanks! On Friday, December 6, 2013 12:56:55 PM UTC-5, Leandro Machado Pereira wrote: > > I don't see any problem. > > I think this is normal. > > > 2013/12/6 Dave M. > > >> I considered that approach. But what about the rest of the pages? >>

Re: Layout question - adding a class to a wrapper div

2013-12-06 Thread Dave M.
his. > > In you controller > $this->set('wrapperID', $myWrapperID); > > In your layout > echo $wrapperID; > > Best regards; > > > 2013/12/6 Dave M. > > >> Let's say I have a default layout containing this body >> (overly-simplified):

Layout question - adding a class to a wrapper div

2013-12-06 Thread Dave M.
Let's say I have a default layout containing this body (overly-simplified): fetch('content'); ?> I have a need to add a class to the wrapper id for a couple of pages on my site. It seems like creating a new layout is overkill for just one minor addition when everything inside

Re: need help with check/uncheck all checkbox [cakephp]

2013-11-18 Thread Dave M.
I don't think the class option works for multiple checkboxes. What you can do is specify a div and work off of that (you can also reduce your js code): echo $this->Form->input("Country", array("options" => $viewData["countryList"], "multiple" => "checkbox", "onclick" => "resetSelectAll();" ,

Re: Output to PDF with elements and styles

2013-01-23 Thread Dave M.
I had the same issue, and ended up hard-coding the full css link in the head of the pdf layout. eg. http://www.mysite.com/css/styles.css"; /> Not the most optimal solution, but it got me up and running. On Wednesday, January 23, 2013 8:19:04 AM UTC-5, Jeremy Burns wrote: > > So I got Ceeram's

Re: how can i migrate from cakephp 1.2 to 2.x...?

2012-11-03 Thread Dave M.
1. http://book.cakephp.org/2.0/en/appendices/migrating-from-cakephp-1-2-to-1-3.html 2. http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html I would definitely run through #1 just to make sure there are no deprecated items still in use. On Thursday, November 1, 2012 8:07:46 AM UT

Re: why cakephp doesn't support pure MVC

2012-10-15 Thread Dave M.
Also, to use the $c variable in the view, you need to set it in the controller: $this->set('c', $this->M->getX()); http://book.cakephp.org/2.0/en/controllers.html#Controller::set On Sunday, October 14, 2012 10:08:56 PM UTC-4, vinny M wrote: > > He's right seems like you made a mistake calling

Re: A website for cakephp beginners

2012-10-09 Thread Dave M.
I think the problem is that instead of supplying an answer to a question ('Be sure to add $actsAs = array('Containable); to your appModel!'), you instead provide a link to a blog post on your site which says 'Be sure to add $actsAs = array('Containable); to your appModel!'. A post which was cre

Re: struggling with containable - containing the same model twice

2012-10-09 Thread Dave M.
ethod >>> * >>> * View an operation >>> * >>> * @param string $id >>> * @return void >>> */ >>> public function view($id = null) { >>> $this->Operation->id = $id; >>> if (!$th

Re: struggling with containable - containing the same model twice

2012-10-08 Thread Dave M.
ill thinking about this. On Monday, October 8, 2012 7:45:39 AM UTC-4, José Lorenzo wrote: > > You need the alias as cricket said and in your find you need 'contain' => > array('OpUser', 'User') > > El lunes, 8 de octubre de 2012 01:50:05 UTC+2, Greg

Re: struggling with containable - containing the same model twice

2012-10-07 Thread Dave M.
another wild guess: have you attached the Containable behavior? In your AppModel: public $actsAs = array('Containable'); -dave On Saturday, October 6, 2012 2:58:54 AM UTC-4, Greg wrote: > > Sorry to keep bumping, but this is really doing my head in... > > The only "solution" i have is to load th

Re: Cake url

2012-09-09 Thread Dave M.
look at your parentheses. On Saturday, September 8, 2012 1:25:43 PM UTC-4, girl wrote: > > thanks a lottt for reply... > but I print > > $code=$params['code']; > > the problem I want to change it when if statement is true and I do > replacement > > > -- You received this message because you

Re: undefined index error

2012-08-14 Thread Dave M.
I suggest you throw a debug($weeklyroster) into your view to see how the array is actually structured. I would assume that you would want $weeklyroster[0]['Weeklyroster']['week'], $weeklyroster[1]['Weeklyroster']['week'], etc. On Monday, August 13, 2012 11:39:37 AM UTC-4, mohit wrote: > > Hi F

Re: Problem with multiple testAction calls with mocked Auth component - 2.2.1

2012-07-23 Thread Dave M.
I've discovered this doesn't happen when i am logged in to the app itself. I am quite confused. On Monday, July 23, 2012 10:58:34 AM UTC-4, Dave M. wrote: > > After upgrading to 2.2.1 from 2.0.x some of my controller tests are > failing. > It seems as if a mocked Auth comp

Problem with multiple testAction calls with mocked Auth component - 2.2.1

2012-07-23 Thread Dave M.
After upgrading to 2.2.1 from 2.0.x some of my controller tests are failing. It seems as if a mocked Auth component does not survive multiple testAction calls. Am I doing something wrong here or is this expected? CandidatesControllerTest.php public function testExportAdmin() { $Candidates = $t

Join table issues

2007-10-12 Thread Dave M.
Hi all, I am working on a CakePHP app where people can view and sign up for classes (or 'meetings', as i have called them. That was the best synonym i could think up for the reserved word of 'class'). Unfortunately, i can't change the existing database structure, so i am trying my best to work wit

Re: Loop through records in Model and update records

2007-07-07 Thread Dave M.
indByPrinted('N'); > foreach($ret as $row){ > $this->id = $row['YourModel']['id']; > $this->save(array('printed'=>'Y')); > } > > } > > 3. If that doesn't work, try

Loop through records in Model and update records

2007-07-06 Thread Dave M.
Hi all, For some reason I cannot get this to work, but I know there is something simple I am overlooking. I have a function in my model which should find all records with a certain criteria (in this case, those records whose 'printed' field is 'N') and then update those records (changing 'printed