Black Snow |
09-17-2014 03:01 PM |
Quote:
Originally Posted by ozzy47
(Post 2514507)
O create a new template, in each style, with the exact contents you want. Then create this plugin using the hook location, template_render_output
PHP Code:
if ($this->template == 'OLD TEMPLATE NAME')
{
$this->template = 'NEW TEMPLATE NAME';
}
|
I eventually got this to work. Not sure why it won't work on my custom pages.
Anyway, is there any way to use the above code and have 10 different templates changed using an array or something like this?
PHP Code:
if ($this->template == 'OLD TEMPLATE NAME 1')
{
$this->template = 'NEW TEMPLATE NAME 1';
}
if ($this->template == 'OLD TEMPLATE NAME 2')
{
$this->template = 'NEW TEMPLATE NAME 2';
}
if ($this->template == 'OLD TEMPLATE NAME 3')
{
$this->template = 'NEW TEMPLATE NAME 3';
}
if ($this->template == 'OLD TEMPLATE NAME 4')
{
$this->template = 'NEW TEMPLATE NAME 4';
}
So instead of a new plugin for each template I change something in, I can do it all in one plugin.
|