Warning: Illegal string offset '_imagedir' in /home/cakephpf/public_html/lofiversion/index.php on line 545

Warning: Illegal string offset '_emodir' in /home/cakephpf/public_html/lofiversion/index.php on line 546
CakePHP UnOfficial Community Forum > include multiple views in one page
Help - Search - Member List - Calendar
Full Version: include multiple views in one page
CakePHP UnOfficial Community Forum > Layouts and Design

I'm trying to implement a portlet type of view, where you can include multiple controller views on one page.

For example, I have a LoginController that displays a userid/passwd box. I have a CategoryController that displays all categories in a box. I have a PollController that displays a survey box and so on and so forth.

On the home page, I want to include all 3 (or more) views of the controllers... i.e.

<?php include="http://servername/x/logins" ?> (renders logins/index.thml)
<?php include="http://servername/x/categories" ?> (renders categories/index.thml)
<?php include="http://servername/x/polls" ?> (renders polls/index.thml)

I was able to get this to render the layout successfully in Firefox (but not IE). However, the Session information gets "lost". I think the reason is because of the "http://servername..." ? ? ?

Is there an alternative approach to achieving this type of view design ?
Yes, use one view with elements in it. Elements are : login element, category element, etc ...

It wil be much easier that way.
thx for the reponse blux. do you have a code snippet ? i'm not familiar w/ "Elements"
Check the manual man. There's some examples there and search in this forum, maybe you'll find some too
Elements are basically work the same as normal views, except that you can use them everywhere and anytime (inside the layout, inside a view, inside another element).

Here's the chapter at the manual

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2015 Invision Power Services, Inc.
Lo-Fi 1.1 iDS Beta, Originally written by Matt,
re-written by Shaun Harrison, Layer 04.com, for pre IPB2.0 versions.