Page 1 of 1

Assign Template?

Posted: Tue Nov 20, 2007 11:41 pm
by byoung618
Does anyone know how exactly the 'assign template' feature works? Is that the only way to assign a template to a menu item?

I was wondering if it is possible to create a php script that would automatically change templates depending on what section or category you are on. Is this possible?

Re: Assign Template?

Posted: Wed Nov 21, 2007 4:40 am
by kdevine
I think this would be possible with a system plugin. Use the setTemplate method of $mainframe inside a onAfterInitialise method of the system plugin you create. For reference, check out plugins/system/remember.php to learn how to create the plugin and includes/application.php to learn how to set a template.

Re: Assign Template?

Posted: Wed Nov 21, 2007 7:56 am
by infograf768
You may want to have a look at this extension
http://forum.joomla.org/index.php/topic,216303.0.html