Welcome Guest, Not a member yet? Register   Sign In
Sub Folders Link Question
#1

[eluser]razerone[/eluser]
On The Controller Files What is the best way of adding a theme template folder link.

example.

In the views folder would look like this

views/theme/default/template/common/header.tpl
views/theme/default/template/common/footer.tpl
views/theme/default/template/common/home.tpl

how would I make it so controller would pick it up

like there would be a controller called header.php

application/controllers/common/header.php
application/controllers/common/footer.php
application/controllers/common/home.php
#2

[eluser]razerone[/eluser]
For those who want to have theme showing in views>theme sub folder I think I have found nice code. goes in index.

if (is_dir($application_folder))
{
define('APPPATH', $application_folder.'/');
}
else
{
if ( ! is_dir(BASEPATH.$application_folder.'/'))
{
exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
}
define('APPPATH', BASEPATH.$application_folder.'/');

}

define('DIR_TEMPLATE', dirname(__FILE__).'/'.$application_folder.'/views/theme/');




Theme © iAndrew 2016 - Forum software by © MyBB