Assigning templates to forums or galleries.

Written by Matt on 9 November 2009

Topics: Uncategorized

More often than not when using multiple templates on a site the
templates are variations of one template that begins with cloning the
primary template to a dir of another name.

EG:
1. /templates/MyTemplateName
2. /templates/MyTemplateName_forum
3. /templates/MyTemplateName_gallery

In this case there are 2 options:
1. Clone the whole template dir tree
This
gives a completely independant template but all paths must be altered
in the template index.php to suit the new template name.
2. Clone only index.php and the /css
This
allows all includes to still point to the primary template reducing
redundancy while allowing the 2 most important files to be unique.

I
do the above when I want the possibility of 3 cols everywhere except
the forum and/or the gallery.  Since the needs of a forum are about the
same as a gallery, both need the full width with 1 main column,
creating /templates/MyTemplateName_special is adequate for both. 

A
side note: forums do not work very well when assigned to a different
template and require the “Default” = MyTemplateName_special and the
primary site template be set to “Assigned” = MyTemplateName.  The
reason it needs to be done this way is each forum post is unique and
cannot be part of the Joomla! menu structure, so it will be loaded by the
Default template.  This is a work-around and will require that every
new menu item be assigned to the primary template MyTemplateName as
opposed to the default template MyTemplateName_special  and will be
necessary until Joomla! allows assigning a template to a section or
category rather than only to a menu item.

Get notified about new tips & tricks for Joomla:

RSS

Click here to subscribe via RSS feed


subscribe

Click here to receive updates via email

Leave a Comment Here's Your Chance to Be Heard!

CommentLuv Enabled

Subscribe without commenting

Joomla! is the registered trademark of Open Source Matters, Inc and Joomlatips.com is not affiliated with or endorsed by Open Source Matters, joomla.org or the Joomla! project.