Show Different Joomla Template Styles on Different Pages
- Written by Valentín García Valentín García
- Category: Joomla Templates Joomla Templates
- Published: 12 December 2016 12 December 2016
Template styles are a very powerful feature in Joomla.
Template styles allow you to assign different versions of the same template to specific pages.
In this tutorial, I'm going to show you how to assign two template styles. We'll assign one style to the home page and another style to the rest of the site.
Step #1. Duplicate the template style
When a template is installed, a single template style is generated by default. Let's make a new copy from that style:
- Go to Extensions > Templates.
- Check the template style you want to duplicate.
- Click the Duplicate button.
Now you have two instances of the same template (aka "template styles").
Step #2. Assign the new template style to home
One of the template styles is assigned to all the pages, and this is marked with the yellow star.
The template style we just generated is "Not assigned" yet to any page.
- Click on the name of the new style.
- Rename this style to something more descriptive, such as "Your Template - Home". This makes it clear that we will use the style on the homepage of our site:
- Go to the "Menu assignment" tab.
- Check the pages where you want to apply this template style. In this example, we just choose "Home".
Change the settings according to your needs. This may depend on the features available on the template you're using.
Let's say you want to display a built-in slideshow from the template only on the homepage. You can change the parameters to make this possible.
- Click "Save & close" when you're done.
- The new style now says that it is "Assigned on 1 pages":
Step #3. Check that the styles are working correctly
The default template style is assigned to all the pages, except "Home", in this example.
Go to the front of the site, and check to make sure that both templates are working how you wished, and that they are assigned to the correct pages.