Re: Layout specific helpers
function beforeRender() { if ($this-autoLayout is_array($this-helpers)) { switch ($this-layout) { case 'custom_one': $this-helpers = am($this-helpers, array('Menu', 'BreadCrumbs')); break; case 'custom_two': $this-helpers[] = 'Menu'; break; default: break; } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Layout specific helpers
I have certain helpers needed in some layouts - not views - Currently I'm including them in app_controller.php but that seems like a waste of ressources when layouts not using these helpers are rendered. An example could be a menu helper. A menu belongs to the layout - Not the view being rendered. So my question is: Is there a better way to get access to a helper per layout? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---