page.title

During the development of a website, developers often encounter situations where they need to define a different template or template layout for a specific page on the site. Joomla provides two methods for achieving this - via the template directly or via the menu item itself.

This document will take you through the process of defining a new template copy and its assignment to a specific menu item.

Create a duplicate copy of your template

In this example we are going to assign a variation of our default template to a specific menu item. In order to do this we need to use the duplicate template function in the template administrator.

Please note that it is not possible to assign the default template to a menu item since it is already assigned to all menu items.

How to duplicate a template in Joomla.

  1. Go to your template manager in your site's administrator

  2. Click on the checkbox next to the template you want to duplicate

  3. Click the duplicate button in the sub menu toolbar

duplicate template

If you did all of that correctly and as explained, you will have a new copy of the template in the template manager template list.

duplicated template

Assign the duplicate template to a menu item

  1. Navigate to the template manager.

  2. Click on the template name to enter the template administrator screen or check the checkbox next to the template name and click on edit in the toolar at the top of the page.

  3. You will then get a list of all menus defined on the website and list of all menu items in each menu. Select the menu item/s for which you want to assign this copy of the template.

  4. Click on “Save & Close” button to save changes.

template manager edit style

Assign a template to a menu item in T3 based templates

Assigning a template to a menu item in T3 based templates is effectively the same process used to assign one of the default Joomla templates. The only difference is that the T3 interface is slightly different to the core Joomla template administrator.

  1. Navigate to the template manager.

  2. Click on the template name to enter the template administrator screen or check the checkbox next to the template name and click on edit in the toolar at the top of the page.

  3. In the template administrator click on the Assignment tab.

  4. You will then get a list of all menus defined on the website and list of all menu items in each menu. Select the menu item/s for which you want to assign this copy of the template.

  5. Click on Save button (or Save & Close option if you click on down arrow next to Save title on the button).

assign to page

When you save your changes in template configuration, you will see that this template received green checkmark in Assigned column in template manager, which visually tells you that template is assigned to some menu items.

assigned to template

Assign a template to a menu item through menu manager

The second way of assigning a template to a specific menu item is through the menu item configuration itself. This way of assigning a template can be useful when you already have prepared copies of the required template as described in previous paragraphs.

  1. Create a new menu item in the menu manager.

  2. Look for a “Template Style” configuration parameter in menu item configuration.

  3. Click on the select box next to that parameter title and you will get a selection of available templates and template copies.

  4. Select the appropriate template and click on the “Save” button.

  5. That menu item will be assigned to a selected template after that.

template style

blog comments powered by Disqus