Welcome Guest, Not a member yet? Register   Sign In
CMS like blocks in a main template file
#1

[eluser]Stylec[/eluser]
Hi, I'm trying to port a site to CI and am looking for ways to do the following.

At present i have a site that has the template coded into the index.php file, I then just use include('topnews.php') to show the topposts from the forums where ever i want.

In topnews.php i get the news from the DB and then pass them to a html template file. This then gets displayed on the index.php file like a block on the left or right side.

In CI i am thinking of having it like this-

Use matchbox to add module support. Have a module called news. Then have a controller called news_block that calls the news_block_view but how do i call the news_block from the main template file just like i did with the include.

Maybe the structure as shown.

modules
-news
--controllers
news_block.php
--views
news_block_view.php

views
-themes
--default
theme.php

Thanks for any help.


Messages In This Thread
CMS like blocks in a main template file - by El Forum - 05-24-2008, 03:43 PM
CMS like blocks in a main template file - by El Forum - 06-04-2008, 10:11 AM
CMS like blocks in a main template file - by El Forum - 06-04-2008, 04:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB