Joomla custom Template Override not working

喜欢而已 提交于 2019-11-29 12:22:52

In order for an alternative layout to be used, two conditions must be met -

  1. You must select the layout in the article parameters
  2. No menu item can exist for this item - the layout selection of the menu item will override the selection in the article parameters

It sounds like your problem is with #2.

EDIT Duh, I missed the key part of using alternate layouts. In order to be able to use an alternate layout with a menu item, you have to create an alternatelayout.xml file and place it in the override folder. This will give you an additional menu item option that you select when creating your menu item. You should be able to copy the defailt.xml file and edit it for the new layout.

I created a visual tutorial for this as it was driving me mad for about two days until I figured out how to actually work it. You can find it here: Joomla custom article template

I hope it helps others solve this faster than I did :-)

PS: all the credit for the article goes to Brent!!

the name of the files must be the same. The override must have the name "default". So its:

/yourTemplate/html/com_content/article/default.php
/yourTemplate/html/com_content/article/default.xml
/yourTemplate/html/com_content/article/default_links.php

had exactly the same problem, this solution solved it.

Also, note that any override filenames must be lower case. For example, "AboutPage.php" won't work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!