Assign Template?

Discussion and education for beginner / novice programmers interested in embarking on the development process to take advantage of the extensible nature of the Joomla! CMS.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Forum rules
Post Reply
byoung618
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Nov 15, 2007 8:29 pm

Assign Template?

Post by byoung618 » Tue Nov 20, 2007 11:41 pm

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?

kdevine
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Mar 02, 2006 8:38 pm
Location: Baltimore, MD

Re: Assign Template?

Post by kdevine » Wed Nov 21, 2007 4:40 am

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.

User avatar
infograf768
Joomla! Engineer
Joomla! Engineer
Posts: 366
Joined: Fri Aug 12, 2005 3:47 pm
Location: •Translation Matters•

Re: Assign Template?

Post by infograf768 » Wed Nov 21, 2007 7:56 am

You may want to have a look at this extension
http://forum.joomla.org/index.php/topic,216303.0.html
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.


Post Reply