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.
#2

[eluser]heriniaina[/eluser]
Maybe you can check this and contribute

http://code.google.com/p/ci-cms

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

[eluser]wiredesignz[/eluser]
@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