Sorry about my post earlier. I got called away from computer mid-post, and I it looks like Google submitted it??
Anyhow -- I don't know if this is the "right" way of doing things, but this is how I solved the same problem. http://groups.google.com/group/cake-php/browse_thread/thread/620dd148118b8b0b/afac03a37b6957d0?lnk=st&q=&rnum=20#afac03a37b6957d0 On Jan 24, 2:30 pm, "dkarlson" <[EMAIL PROTECTED]> wrote: > I don't know if this is the right way to do things or not > > On Jan 24, 2:05 pm, "Davy" <[EMAIL PROTECTED]> wrote: > > > Hi, I'd also like to know how to accomplish this. > > > On Jan 14, 12:34 am, "NewbieCaker" <[EMAIL PROTECTED]> wrote: > > > > Hi All, > > > > I am new to CakePHP and have a question regarding modular coding in > > > cake. > > > > Basically, let's say I am implementing a bookstore, and I want to have > > > a generic layout that will be used throughout the pages, which is very > > > easy in CakePHP. Along with that, I would like to have modules (div > > > boxes with specific content coming from the db) that would be shared > > > across the pages, such as most active books , newest items, etc. > > > > Now, I can do this with Cake by invoking the relevant model from the > > > controller, and coming up with cake "elements" which take this data. > > > But, as I said, I don't want to include these models over and over on > > > every page that contains this module and want my modules to be totally > > > independent and completely modular, in an encapsulated way that they > > > will have their own model/own controller and own view and I just want > > > to include this as a black box. This is especially important, given > > > that I want to use these modules across pages and do not want to > > > replicate code and/or minimize code replication. > > > > Basically, my layout will have "div" areas, and I want to place various > > > "modules" in these divs depending on some configuration, i.e. on main > > > page div1 will have most active books, on some other page, e.g. book > > > view page, I want to place them on div5, and so on. > > > > A typical usage of this is the modules concept on Joomla/Mambo... > > > > Is something like this possible in CakePHP? Could you please provide > > > suggestions as to how I come up with encapsulated modules like this? > > > > Thank you 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 -~----------~----~----~----~------~----~------~--~---
