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

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.



Thanks for any help.

Maybe you can check this and contribute


This is not blaze :-) this is a new cms but the theme is blaze theme.

@Stylec: If you need view partials/blocks within modules, why not try Modular Extensions 4.1, it is designed for this purpose.

Good Luck.

Theme © iAndrew 2016 - Forum software by © MyBB