Created an override for com_content > category
Which did create an override directory in my template directory:
/templates/TEMPLATE_NAME/html/com_content/category/
Which has the following files:
blog.php
blog_children.php
blog_item.php
blog_links.php
default.php
default_articles.php
default_children.php
Create additional php files that will give the ability to create a custom category blog layout.
Attempted various file naming conventions to have the system give an additional option in the "Chose a Layout" dropdown menu but "Component - Default" is the only available option, even though technically it should also have "Template - Default" as well Because of the template override being created.
Joomla 3.8.10
Can that "option" be hidden or made read-only so people do not get the impression there is a way to create a custom layout?
Choose a Layout
option in Category Blog
menu item refers to single article layout, not to category layout. So it works as expected but perhaps could be made clearer. You can see that it's working by creating custom.php in /html/com_content/article/.
Thank you for the response.
I guess I am expecting the same behavior with module custom views.
For example if I created a template override for mod_articles_latest the system would create a directory under my template's : html/mod_articles_latest and have a default.php file. I would basically create my own customview.php and when I would go into the module's advanced tab, under the layout dropdown menu, the filename I created would be listed there.
I guess that is where my confusion lies.
So in reality I need to create a totally different menu item type?
So in reality I need to create a totally different menu item type?
It all depends on what you're doing.
A menu item is generally a set combination of a layout within a view within a component (so the category blog menu item is the blog.php
layout of the category
view of com_content
). So if you're aiming to create a custom category layout that can be routed to (assigned a menu item), yes you'd need that.
Layouts are added in a merging fashion. If you create an override of existing layout e.g. default.php
, it will automatically override component/module layout and will not be shown in layout list. Meanwhile, if you add a custom layout (e.g. custom.php
), it will not be used by default but it will appear in layout list for you to choose.
Status | New | ⇒ | Discussion |
Category | ⇒ | Layout |
Thank you gentlemen for the detailed explanations. You can close this, and my apologies for reporting a bug without fully understanding how it works to begin with.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-18 17:13:43 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/21175
closed as stated above.
No apologies necessary
If you're trying to create a new layout
new.php
, you need a corresponding XML file to go with it for the menu manager to pick it up.