J3 Issue ?
avatar Gnevyshev
Gnevyshev
21 Aug 2018

Joomla 3.8.11

Alternative category layout from my template does not work.

Сopy file blog.php from the location /components/com_content/views/category/tmpl/
to /templates/mytemplate/html/com_content/category/
So overriding works.
But:
If rename file, for example, myblog.php and choose this layout when edit category in back-end (options tab), overriding does not work.

avatar Gnevyshev Gnevyshev - open - 21 Aug 2018
avatar joomla-cms-bot joomla-cms-bot - change - 21 Aug 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Aug 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Aug 2018

Please ask help on the forums. This repository concerns in first Place Joomla-Core coding. For this Reason closing this Issue, thanks.

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Aug 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-08-22 04:18:26
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 22 Aug 2018
Closed_Date 2018-08-22 04:18:26 2018-08-22 04:18:27
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 22 Aug 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 22 Aug 2018
avatar Gnevyshev
Gnevyshev - comment - 22 Aug 2018

But the override is not a function of the Joomla-Core?
Overriding does not work.
Please take a closer look at this.

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Aug 2018
Status Closed New
Closed_Date 2018-08-22 04:18:27
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - change - 22 Aug 2018
Closed_Date 0000-00-00 00:00:00
avatar joomla-cms-bot joomla-cms-bot - reopen - 22 Aug 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 22 Aug 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Aug 2018

Reopened as stated above.


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Aug 2018
Category com_content
avatar infograf768
infograf768 - comment - 22 Aug 2018

It looks like it is broken here too.
If it is confirmed, it is a major break.

avatar infograf768 infograf768 - change - 22 Aug 2018
Labels Added: J3 Issue
avatar infograf768 infograf768 - labeled - 22 Aug 2018
avatar infograf768
infograf768 - comment - 22 Aug 2018

To help solve the issue:
If we go into Articles Options, we do get the choice:

screen shot 2018-08-22 at 07 34 48

But in the category blog menu item we don't
screen shot 2018-08-22 at 07 36 32

avatar SharkyKZ
SharkyKZ - comment - 22 Aug 2018

@infograf768 this is expected behavior. See #21175 comments.

avatar infograf768
infograf768 - comment - 22 Aug 2018

You are evidently right.
We have to create a custom xml in order to propose it as new menu item type.

screen shot 2018-08-22 at 08 02 30

The xml can be a copy of the core one EXCEPT its layout name

<layout title="COM_CONTENT_CATEGORY_VIEW_MY_BLOG_TITLE" option="COM_CONTENT_CATEGORY_VIEW_MY_BLOG_OPTION">
		<help key = "JHELP_MENUS_MENU_ITEM_ARTICLE_CATEGORY_BLOG" />
		<message>
			<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_DESC]]>
		</message>
	</layout>

In order to choose it (I did not create a string here)
screen shot 2018-08-22 at 08 15 45

avatar infograf768
infograf768 - comment - 22 Aug 2018

Closing as explanations have been given in details...

avatar infograf768 infograf768 - change - 22 Aug 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-08-22 06:18:23
Closed_By infograf768
avatar infograf768 infograf768 - close - 22 Aug 2018
avatar Gnevyshev
Gnevyshev - comment - 22 Aug 2018

But i don't want to override menu Item.
I want to override blog layout.
Joomla offers it in Category edit Options.
But it doesn't work.

avatar infograf768
infograf768 - comment - 22 Aug 2018

@Gnevyshev
The possible layout override in category edit Options in the blog menu item ONLY concerns articles displayed by the blog NOT the blog itself.

If you want to always override the joomla blog layout, then just add in html the files concerned with the SAME name as in core and modify them to fit.
If you want the choice between 2 types of blog layout, create a menu item type as stated above.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Aug 2018

This needs a simple User Interface.

avatar Gnevyshev
Gnevyshev - comment - 22 Aug 2018

@infograf768
Yes, I see that now it works that way. But it's not right. It would be better if we could set the layout for category.

avatar SharkyKZ
SharkyKZ - comment - 22 Aug 2018

@Gnevyshev the Layout option from category is used for categories that have no menu item. If your category has a menu item, it will use the layout from menu item.

avatar infograf768
infograf768 - comment - 22 Aug 2018

BTW: the interface to create overrides in a template exists through The overrides tab
screen shot 2018-08-22 at 09 00 11

There one can copy/rename/edit/create the necessary files.

avatar ggppdk
ggppdk - comment - 22 Aug 2018

But i don't want to override menu Item.
I want to override blog layout.
Joomla offers it in Category edit Options.
But it doesn't work.

I think the language string description can have some improvement

The 'Layout' in category options

Is used when

  • no active menu item
  • there is an active menu item but it is not a category view menu item

About "Choose layout" in category menu item it is not so clear that it is about articles

avatar ggppdk
ggppdk - comment - 22 Aug 2018

I have not tested anything, i was only looking at source code, so i could be wrong

avatar Gnevyshev
Gnevyshev - comment - 22 Aug 2018

@SharkyKZ

the Layout option from category is used for categories that have no menu item. If your category has a menu item, it will use the layout from menu item.

Understand.

@ggppdk, agree.

avatar coolcat-creations
coolcat-creations - comment - 22 Aug 2018

Agree, this issue has been raised already so many times that we should not just close it but improve it. Otherwise we will have this discussion over and over again.

Add a Comment

Login with GitHub to post a comment