Step 5 - Use an alternative layout

In this article we will show you, how to use an alternative template.

The second difference is that template overrides are loaded automatically when the module or the component is called. An alternative layout will be only used when it is selected in the configuration of the component or module.

Alternatives Layout 2

Here you see the list of files that are stored in the template for the module or component  (e.g. "templates/yourtemplate/html/com_content/article").

It is important to understand, that if you select an alternative layout in the parameters, this file will be used no matter which template is configured as standard. That means, if you decide to use "newtemplate" instead of "yourtemplate" for the website, the alternative layout of "yourtemplate" will still be loaded for the module or component. Layouts should be created in a way that they can work well in different templates.

It is possible to set the alternative layout in the global configuration. For example under "Content -> Article Manager" you will find in the global options a parameter for alternative layouts.

Of course you can also select the alternative layout only in one element of the component, for example in one article like showed in the screen shot above.

Alternative layouts for componentes can be used for articles, contacts or news. Weblinks have no alternative layouts.

Alternative layouts for components can be used if two requirements are fullfilled:

  1. they are selected un the parameters of the component
  2. there is no menu item for this component. The alternative layout selected in the parameters of an article will be not loaded, when you have a menu items of type "Single article" for this element. The layout defined by the menu item has priority. That follows the rules of how parameters work, the more specific (in this case the parameters of the menu item "Single article") has priority over the less specific one (in this case the parameters of the article).

And the J.O.S.C.A.R. goes to...

JAB15 logo

j-over.de. Our project won on the J and Beyond 2015 the J.O.S.C.A.R. as "Innovation of the Year".

.

Overrides from

  • 1559507_696946120343022_2619986911434960761_o
  • axel_tueting
  • 1a3bf2dda6069464905e3816f494b587
  • george
  • 5a67ea5f9da573adf828721341a2dc7f
  • 11036042_912712812082877_9026187587615442228_n
  • marco_schauz
  • 7d55f932dabcae1e85c6543901fcc581
  • 1bbbb27
  • aadb08dad2365a68c233cde0b2716e3a
  • d72a769d3a4103928603a345e6a054e9
  • 00844f47ba7bf84a8f8fefdf719416bb

Our sponsor

Kubik Rubik Extensions

sponsor fc hosting

logostore jes2

logo Yireo 500px 4 bevel

New Overrides

The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries.

j-over.de is not affiliated with or endorsed by Open Source Matters or the Joomla.