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): div id=wrapper div id=nav !-- some nav stuff -- /div div id=content ?php echo $this-fetch('content'); ? /div /div I have a need to add a class to the wrapper id for a couple of pages on my site. It seems

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

2013-12-06 Thread Dave M.
wrote: Try this. In you controller $this-set('wrapperID', $myWrapperID); In your layout echo $wrapperID; Best regards; 2013/12/6 Dave M. mil...@gmail.com javascript: Let's say I have a default layout containing this body (overly-simplified): div id=wrapper div id=nav

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. mil...@gmail.com javascript: I considered that approach. But what about the rest of the pages? I could do something like

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(); , div = countries ,

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. link rel=stylesheet type=text/css media=all href=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

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

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 your

Re: struggling with containable - containing the same model twice

2012-10-09 Thread Dave M.
? On Mon, Oct 8, 2012 at 10:52 PM, Dave M. mil...@gmail.comjavascript: wrote: I suspect there is something else going on specific to your setup. I baked up a quick test app and had no problems at all. I didn't alias the association at all. My model names and associations were the same

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

Re: struggling with containable - containing the same model twice

2012-10-08 Thread Dave M.
:17 AM, Dave M. mil...@gmail.com wrote: 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

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 the

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 are

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

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 =

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 component does not survive

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

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