Re: Dynamic Navigations
You could create XML sitemaps from which you draw the actual urls and text for your navigation links. Then create an admin tool (page) to administer those XML files. That is pretty common in professional web development. On Wed, Jan 27, 2010 at 9:06 AM, Dave make.cake.b...@gmail.com wrote: I m trying to figure out the best way to create dynamic navigation but not sure where to start. The idea is have a manager for main nav, left side, right side, footer so the admin can create or edit each nav from the manager. They most likely will not change from page to page so all the navs will be the same when used. I was thinking tables sections: id navigation_id title = about Us controller = information action = index navigations: id name = main, left, right, footer Ideas? Thanks, Dave Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- Nathan Lane Blog, http://blog.nathandelane.com Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Displaying apostrophes
Is there something different about your different pages? Like encoding. For example are you maybe not encoding a page as text/html for the content type? I doubt this is the problem though, since the entity #39; should work for XML also. But it may be a possibility. Nathan On Tue, Jan 26, 2010 at 5:05 AM, Céryl c.a.h.wilt...@student.tue.nl wrote: Hi all, I have currently developed a new problem in my website. When storing a name into the database wich contains an apostrophe ( ' ), it stores this in the DB as #39; the ASCII code for it. (that's Amperand, Poundsign, 39, semicolon in case googlegroups parses it also) Now some of my pages parse this correctly and display the apostrophe, some display the ASCII code. I can't find what makes it display it differently on some pages and not on the others... Even escaping it with a \ just makes it display \' on one page and \$#39 on the other. Both get the same data through the same model... Well, it's just simply the same site, just consistently different per page... Any clues what might be the problem? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- Nathan Lane Blog, http://blog.nathandelane.com Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: named params and prefix routing
What were you expecting the Router to return if not /invoices/edit/5/ owner:1/key:val? On Dec 11, 4:39 am, Marcelius [EMAIL PROTECTED] wrote: Hello! I have this route like the manual says for prefix routing: Router::connect('/owner/:controller/:action/*', array ('prefix'='owner', 'owner'=true)); This works fine until I want to create a url with some named params in it: Router::url(array(controller=invoices, action=edit, 5, owner=true)); returns /owner/invoices/edit/5 as expected. Router::url(array(controller=invoices, action=edit, 5, owner=true, key=val)); returns /invoices/edit/5/owner:1/key:val not as expected. Something wrong in my routes? Please note that that's the only route available. Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: $form-input() helper question
Hi maytawn, I would advise against using the inline css to style the label tag. I would recommend adding the CSS to your file but specify a specific label defininition for the cake forms. For example the form helper automatically wraps the form elements and labels in a div with an appropriate classname for the type of form element. So to style the labels for a form input you could use: div.input label { width: 300px; } Let me know if that helps. - Lane On Dec 10, 4:43 pm, maytawn [EMAIL PROTECTED] wrote: I have an instance where I need to increase the width and style of the label tag that is automatically created with the $form-input() method. Since I already have a base CSS defined for all lable tags I would like to add some inline CSS using the style= attribute. I am able to add the style= attribute to the input tage using the 'options' key 'style' as shown below. echo $form-input('password', array('label' = 'New Password:', 'type' = 'password', 'style' = 'width:150px', 'after' = 'br /')); Is there a way to pass in a parameter that would allow me to do the same for the lable tag? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Validation for saveAll not returning messages
Hello, I'm trying to use saveAll to save multiple records of a model in one form. Everything works fine as far as saving and validation goes except for one little problem. If the data entered does not validate, the validationErrors array that is returned does not contain the fields or the error messages for the fields that did not validate. Here is an example setup (same as http://teknoid.wordpress.com/2008/08/04/practical-use-of-saveall-part-2-notes-and-tips/): view echo $form-create(); echo $form-input('0.name'); echo $form-input('0.username'); echo $form-input('0.email'); echo $form-input('0.company_id', array('type'='hidden', 'value'=1)); echo $form-input('1.name'); echo $form-input('1.username'); echo $form-input('1.email'); echo $form-input('1.company_id', array('type'='hidden', 'value'=1)); echo $form-end('Add'); controller function add() { if(!empty($this-data)) { $this-Account-saveAll($this-data['Account'], array('validate'='first')); } } If I try to submit the form without entering a username for either (or entering one that is not alphanumeric), the form does not validate, but it does not show any errors. When I print out $this-Account- validationErrors I get the following array: Array ( [0] = Array ( ) [1] = Array ( ) ) So it knows that entry 0 and 1 did not validate, but it doesn't return the error messages or fields. Has anyone encountered this problem, or perhaps know a fix. I created a work around for now, but it would be nice if saveAll would display the errors. If I do this method it works fine: foreach($this-data['Account'] as $k = $v) { $this-Account-set($v); if(!$this-Account-validates()) { $errors[$k] = $this-Account-validationErrors; } } if(empty($errors)) { // All records have validated, it is safe to save $this-Account-saveAll($this-data['Account']); } else { $this-Account-validationErrors = $errors; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---