codeigniter-simplicity icon indicating copy to clipboard operation
codeigniter-simplicity copied to clipboard

integrating with other views

Open mridulcs2012 opened this issue 12 years ago • 4 comments

I installed simplicity template by setting $route['default_controller'] = "example"; in routes.php under application->config.Now suppose i have another controller say forum.php and a view forum.php in views folder.if i place a link in your template page which will redirect to http://localhost/codeigniter/index.php/forum/forum, then that forum view will be displayed, but how do i display this forum view under ur template's let's say content area? how this goes as codeigniter is all displaying views.All i mean how other views displayed along with ur default template?

mridulcs2012 avatar Nov 01 '13 15:11 mridulcs2012

Hello @mridulcs2012 . This is related with the issue #4 that was reported before. What I am trying to say is that for now there is not any configuration to actually have a default template to the library. So for now there are two solutions that I can give you in order to achive that.

Solution 1. Add just this one line code at your constructor. With this way you can know that forums.php controller will have the default template.

function __construct()
{
    $this->output->set_template('default'); // Add this line to your controller
}

Solution 2. You can actually see a work around at issue #3 . This is the way I am doing it at my personal projects right now to have a default template.

Of course I have plans to have a default template feature at the future. I just need to find some more time to do it :)

If you still having issues, please let me know.

scoumbourdis avatar Nov 02 '13 10:11 scoumbourdis

So any other completed template library available in web? by that i can achieve what i want?

mridulcs2012 avatar Nov 05 '13 15:11 mridulcs2012

I couldn't found any completed template library for Codeigniter, that's why I've created this library :)

scoumbourdis avatar Nov 05 '13 15:11 scoumbourdis

Can anyone help using sections in codeigniter simplicity. How to use load->section and get_section in master page or theme structure. Thank you

edyrkaj avatar Aug 31 '14 14:08 edyrkaj