Quote:
Originally Posted by harmor19
Why can't you use a simple variable instead of those functions
|
I would guess because he wants to learn how to use templates.
Quote:
Originally Posted by acidburn0520
Try this code in a plugin using hook 'cache_templates':
Code:
if (THIS_SCRIPT == 'index'){
$globaltemplates = array_merge($globaltemplates, array('silly_newbie_template'));
}
|
Array merge is overkill for this, just add to the array.
PHP Code:
if (THIS_SCRIPT == 'index')
{
$globaltemplates[] = 'silly_newbie_template';
}