-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong condition in componentlayout field, custom layout ignored #9464
Comments
This is intended. Basically if you choose to supply an article XML field then its designed to be used in the menu manager as an alternative menu item type. If you wish to choose it in article menu then you must only supply the php file WITHOUT an xml file. I'm not sure why this was made the intended behaviour but it would be a massive b/c break to change at this point in Joomla 3 - sorry :( |
Because Component Layouts (with a PHP File) and Menu Types (for Menu Manager with an XML file) are treated differently by the CMS. If you remove the XML file then you can use it in Articles and Categories but not in the Menu Manager. |
Ok, so there is an other bug.. maybe not part of the "component layout" field.. If you create a menu Item (with a custom Layout com_content/category) in order to display articles of multiple categories AND subcategories, the first page will have the good layout (the custom) but if you go deeper, in a subcategory, the layout will not be the good one. Do you need steps to reproduce the issue ? |
Steps to reproduce the issue
Create a custom layout in your frontend template :
/templates/mytemplate/html/com_content/category/myblog.xml (copy of blog.xml)
/templates/mytemplate/html/com_content/category/myblog.php
Expected result
Create a new content category (Goto : /administrator/index.php?option=com_categories&view=category&layout=edit&extension=com_content)
Goto tabs "parameters" > "Layout" > select my custom layout "myblog" in the list
Actual result
my custom layout "myblog" is not in the list :(
see screenshot
System information (as much as possible)
All joomla3 versions concerned
Additional comments
Solution :
In ./libraries/legacy/form/field/componentlayout.php +195
replace
|| (in_array(basename($file, '.php'), $xml_files)))
by
&& (!in_array(basename($file, '.php'), $xml_files)))
The text was updated successfully, but these errors were encountered: