J1.5

Template FAQs

From Joomla! Documentation

This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

This Page Needs Your Help

This page is tagged because itNEEDS REVIEW. You can help the Joomla! Documentation Wiki by contributing to it.More pages that need help similar to this one are here.NOTE-If you feel the need is satistified, please remove this notice.

When Joomla! is installed several templates are automatically included. You can find many more templates at other websites. Some are available without charge under various licenses, and some are for sale. In addition, there are many designers available who can make custom templates. You can also make your own template.

Templates are managed with the Template Manager, which is located on the site menu on the Back-end of your site.

To make the new template the default template for your site, select it and click the default icon (star).

How do I modify a template?

Templates are just a series of xml, php, html and image files that are stored in the templates directory of your site. You can edit these files or you can use the editing interface available in the Template Manager.

In the Back-end, select Site>>Extensions>>Templates. Select the template you wish to modify. Click the edit icon.

and You are given the choice of editing "html" and "css."

CSS stands for cascading style sheets. This controls many elements of the look and feel of your site. HTML is the file that controls where positions are defined and positioned. Other than that, it should be noted that, with a few exceptions, what is in the .css and what is in the HTML files largely depends on the approach of the tempate designer.

One common change is to use your own graphic/image. Graphics are linked to in the HTML file. Simply change the reference to the image of your choice. Keep in mind that it if it is a different size than the original image this may change the appearance of the site in unexpected ways.

How do I assign a template to a specific page?

In Joomla! there is a default template, but you can assign other templates to specific "pages" that are defined by menu links.

To assign a template to a page, you must first make sure that there is a direct menu link to the page.

Select the Template and click the edit icon (or click the template name)

In the left column, change "None" to "Select from List."

Select the links you want to apply the template to.

Save

Note that you cannot assign the default template to individual pages.

Understanding

The templating system uses the ItemID to determine which template to show. ItemIDs are created when you create a menu link. This is why only menu items are shown in the list of pages to which you can assign templates.

How do I add a position to a template?

To create a "new" position chose one of the names from the list of positions shown in Site>Template Manager>Module Positions

In your template add

<?php mosLoadModules ('position_name');?>

You will want to surround it with appropriate html so that it appears where you want it to and with the formatting you want.

How do I change the image(s) in my template?

One common template change is to use your own graphic/image. Simple graphics (not banners) are linked in the HTML file. Simply change the reference to the image of your choice in the HTML file of your template. Do this by, in the administrative interface, going to Site>>Template Manager and then selecting your template. Click the icon for html.

Keep in mind that if it is a different size than the original image this may change the appearance of the site in unexpected ways.

The images for a given template are generally located in this folder:

/templates/templatename/images

(where you substitute the name of the template you are using.)

How do I collapse an empty position in a template?

Very often the question is asked on how to collapse a position in any template. Note collapse here means "not show" if no modules are published to these columns.

Here is a method on how to do this as an example with the tremendous popular rhuk_solarflare template:

open ../templates/rhuk_solarflare_ii/index.php and find and replace this:

Save and your left column now will collapse when you don't publish anything to it!

This method you can multiply to any template if you try to follow the logic of the code!

CSS Text/Font Resizing (A+ A-) on Joomla Template

I recognize that there are some of you who are sort of scratching your heads wondering how to get from where your site is now to where joomla.org's is. So for those of you wanting it laid out all the way, here's a more detailed instruction set that summarizes and extends what has already been said through the course of this thread: