hi Raymond, have you thought about using elements. In your views, you can call elements and elements can either request controller or use cache to get specific details
Ritesh On Sep 28, 10:03 pm, Raymond <[EMAIL PROTECTED]> wrote: > Let's say we have a layout as /app/views/layout/mylayout.thtml. We > want to display different content (besides the content of invoked > action) according to current controller/action with the very same > layout. For example if post/add action is invoked, a component named > 'instruction' is rendered; while news/index action is invoked, another > component named 'rss_feeder' is rendered to replace 'instruction'. > > I know that this can be done by having different layouts just for > different use. But most of the content will then be very similar. It's > not DRY and difficult to manage if there is a global change to these > layouts. So I think it's better to pass a variable to the same layout, > so that the layout knows what content to display or requestAction to > invoke. > > I am using Cake 1.1.x.x by the way. > > Do you guys have a solution or a better way to do this? Thanks in > advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
