Components+elements. Usually my components for "miniview" prepare data for element only in startup method and then i call renderElement in layout with this data. May be it is not greatest method but I like it. If I want copy "miniview" from one project to another I need only copy files, and add usually 2 strings - in contoller and in layout.
On Nov 9, 4:29 am, mbavio <[EMAIL PROTECTED]> wrote: > And what is the ideal way if you have many "miniviews"? Many > $variables_for_layout? > > Martin. > > On Nov 8, 8:20 pm, VolCh <[EMAIL PROTECTED]> wrote: > > > Easy way - > > readhttp://bakery.cakephp.org/articles/view/creating-reusable-elements-wi... > > tutorial. It is not ideal way when you have many "miniview" but it > > working :) > > > On Nov 8, 10:38 pm, BobDev <[EMAIL PROTECTED]> wrote: > > > > In my app/views/pages/home.thtml page, I want to access items from 3 > > > of my tables. I just want the title from each and to put it in an > > > unordered list along the side. > > > > How do I do that? Can I just access the controller for each of those > > > tables add a new method (eg. miniview()) and call that, then add a > > > miniview.thtml page? That doesn't seem to work as when I new the > > > table_controller, the Table value is not initialized so the query > > > fails. > > > > <?php > > > include('../controllers/industries_controller.php'); > > > $indus = new IndustriesController(); > > > $indus->miniview(); > > > ?> > > > > Is there a tutorial on how to do this? I am not seeing it in the > > > documentation, so I am probably missing it. > > > > Thanks, > > > > Bob --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
