Welcome Guest, Not a member yet? Register   Sign In
Template library, written for the CodeIgniter PHP-framework
#1

[eluser]CW[/eluser]
I'm trying to learn the Template library, written for the CodeIgniter PHP-framework. I've be able to create a basic template configuration however I'm having some difficulty interpreting groups as discussed in the documentation.

In particular, under Configuration -> Setting The Default Template, there is a reference to a "group set" (i.e., $template['active_group'] = 'default'Wink. Further on in the documentation IV. Dynamically Manipulating Template it appears setting up groups is necessary to switch templates but I cannot determine how to define groups in the template.php configuration file.

I'm just trying to work my way through IV. Dynamically Manipulating Template of the documentation and am not able to continue with the 'rss' example because it appears I need to define the active_group in the configuration file.

Any guidance will be appreciated.
Thanks,
Chris
#2

[eluser]adgezaza[/eluser]
I am having a similar issue trying to define a new template group in the template.php config file. Can anybody post example code on how this works?
#3

[eluser]InsiteFX[/eluser]
If your talking about the database.ph config file it is like this.
Code:
$active_group = 'default';
$active_record = TRUE;

// See the default in the first array element. You would copy this whole stucture and create a new one.
// Then change the default to a new name and change the $active_group to that name.

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = '';
$db['default']['password'] = '';
$db['default']['database'] = '';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

And if your talking about a Library Template then which one ?

InsiteFX
#4

[eluser]adgezaza[/eluser]
talking about this library for CI

http://williamsconcepts.com/ci/codeignit...rence.html

here is my stack overflow question which goes into more depth on the situation.

http://stackoverflow.com/questions/53202...te-library
#5

[eluser]InsiteFX[/eluser]
It should work the same as I showed you above for the database one!

InsiteFX
#6

[eluser]adgezaza[/eluser]
answered:

goo.gl/YbU3J




Theme © iAndrew 2016 - Forum software by © MyBB