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.
Locked
byoung618
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
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! Enthusiast
Joomla! Enthusiast
Posts: 200
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! Master
Joomla! Master
Posts: 18869
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
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

gangrel103
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Jul 06, 2008 4:49 am

Re: Assign Template?

Post by gangrel103 » Wed Jul 16, 2008 12:03 am

thanks for that info


Locked

Return to “Joomla! Coding 101”