?
avatar GCLW
GCLW
18 Jul 2018

Steps to reproduce the issue

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

Expected result

Create additional php files that will give the ability to create a custom category blog layout.

Actual result

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.

System information (as much as possible)

Joomla 3.8.10

Additional comments

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?

avatar GCLW GCLW - open - 18 Jul 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Jul 2018
avatar mbabker
mbabker - comment - 18 Jul 2018

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.

avatar SharkyKZ
SharkyKZ - comment - 18 Jul 2018

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/.

avatar GCLW
GCLW - comment - 18 Jul 2018

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?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21175.
avatar mbabker
mbabker - comment - 18 Jul 2018

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.

avatar SharkyKZ
SharkyKZ - comment - 18 Jul 2018

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.

avatar franz-wohlkoenig franz-wohlkoenig - change - 18 Jul 2018
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 18 Jul 2018
Category Layout
avatar GCLW
GCLW - comment - 18 Jul 2018

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21175.

avatar franz-wohlkoenig franz-wohlkoenig - change - 18 Jul 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-07-18 17:13:43
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jul 2018
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 18 Jul 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 18 Jul 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 18 Jul 2018

closed as stated above.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21175.

avatar brianteeman
brianteeman - comment - 18 Jul 2018

No apologies necessary

Add a Comment

Login with GitHub to post a comment