Within mytemplate, I created an alternative menu and an alternative layout for the com_content articles view, and neither reflects on the front end.
For com_content, in my template, I created the following files:
joomla/templates/mytemplate/html/com_content/article/LandingPage.php joomla/templates/mytemplate/html/com_content/article/LandingPage.xml joomla/templates/mytemplate/html/com_content/article/LandingPageLayout.php
At the top of file LandingPage.xml, the layout section contains:
<layout title="TPL_MYTEMPLATE_COM_CONTENT_ARTICLE_VIEW_LANDINGPAGE_TITLE" option="TPL_MYTEMPLATE_COM_CONTENT_ARTICLE_VIEW_LANDINGPAGE_OPTION"> <help key = "JHELP_MENUS_MENU_ITEM_ARTICLE_SINGLE_ARTICLE" /> <message> <![CDATA[TPL_MYTEMPLATE_COM_CONTENT_ARTICLE_VIEW_LANDINGPAGE_DESC]]> </message> </layout>
Through backend, I can select the alternative menu type, but when I load the web page corresponding to menu item, the HTML corresponds to
I have re-read the documentation for alternative layouts and alternative menu items and rechecked I am following instructions correctly: https://docs.joomla.org/Layout_Overrides_in_Joomla
Also, I looked for duplicate answers, and found:
I believe I understand the logic for the mytemplate alternative menu items and alternative layouts, but I can't figure out what I am doing wrong.
The URL's generated through the back end for the menu items set to this alternative menu type item have the following syntax:
Looking for alternative solutions, I then set the LandingPageLayout.php through the article's configuration Options Layout setting. The article's Options > Layout drop-down shows the alternative layout "LandingPageLayout." However, through the front end, the menu item continues to display the code from /components/com_content/article/view/default.php
To easily differentiate which php file is loading, from among default.php, LandingPage.php, and LandingPageLayout.php, I entered an HTML tag that clearly shows me which file is loading.
What am I doing wrong?
Why is the content from mytemplate article's alternative menu item and alternative layout not loading trough the front?