CodeIgniter Forums
creating page fragments - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: creating page fragments (/showthread.php?tid=1750)



creating page fragments - El Forum - 06-24-2007

[eluser]deineMudder[/eluser]
hello again Wink
compliments first: the more i use CI the more i love it, its a wonderful framework and really speeds up coding.

tho, here is my question.
my controller 'user' got the following functions (search/list/add/edit/delete).
i guess the basic modes for a cms. there is a html template creating a basic table layout to sort all elements on the page ... just like this

Code:
<table>
<tr><td colspan="2">(header)</td></tr>
<tr><td colspan="2">(buttons - navigation for add/search/list ...)</td></tr>
<tr>
  <td>(cms navigation - user, article, gallery ...)</td>
  <td>(content area - forms for editing, adding ...)</td>
</tr>
</table>

i hope u got the idea of it. what i am missing now are the basic includes Wink back in old times before CI i just included my 2 navigations.
to use the same view i would pass a variable to the view and switch it in the content area.
tho id like to include the 2 navigations.

any ideas to make it the right way?


creating page fragments - El Forum - 06-24-2007

[eluser]sophistry[/eluser]
try this:
Embedding views within views which has a lot of nice discussions around it.

and this: View Library (Updated!) which looks like a good general way to solve this problem.

cheers