?
avatar Webdongle
Webdongle
30 Jun 2017

Steps to reproduce the issue

Create a Layout override for Category Blog
Create an Alternative Menu item Type for the new Layout

Expected result

The new Layout should be selectable in Content Options and in the Options of Categories

Actual result

The Layout is only selectable when
There is no underscore in the name
and
There is no xml file for the Alternative menu item

The Alternative Layout should be selectable when it has an Alternative Menu item Type

System information (as much as possible)

Additional comments

Spotted by sagaranvekar in https://forum.joomla.org/viewtopic.php?f=713&t=952306

avatar Webdongle Webdongle - open - 30 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Jun 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Jun 2017
Category com_content com_menus
avatar brianteeman
brianteeman - comment - 30 Jun 2017

Underscores have a specific meaning in layouts as they indicate that they are a aublayout.. see the default blog layout for an example of what I mean. So I would suggest it is expected behaviour that a file with am underscore is not displayed as an available layout.

avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Jun 2017
Status New Discussion
avatar Webdongle
Webdongle - comment - 30 Jun 2017

@brianteeman
Yep thought that might be the case with underscores. But the inability to select a Layout Override in Content Options and in a Category should be there even if there is an alternative Menu item Type for it.

avatar brianteeman
brianteeman - comment - 30 Jun 2017

not sure but that part sounds like an existing issue that we have a PR for testing see #16755

avatar Webdongle
Webdongle - comment - 30 Jun 2017

It may be linked but I think it is a separate issue. Creating a Alternative Layout menu item for a Category blog Override prevents the blog override being selected. But The same is not true for an Alternative menu Item of an Article Layout Override. I will test with the patch for the other issue and see.

This one looks like it's going to be complicated.

Addendum
Have tested the patch for the other issue and it has no affect on this issue. But it looks like it is part of the same issue

avatar Webdongle
Webdongle - comment - 30 Jun 2017

Closing in favour of #16755

avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Jun 2017
Status Discussion Duplicate Report
Closed_Date 0000-00-00 00:00:00 2017-06-30 17:37:12
Closed_By franz-wohlkoenig
Rel_Number 0 16755
Relation Type Duplicate of
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2017
Status Duplicate Report Closed
Closed_By franz-wohlkoenig joomla-cms-bot
Rel_Number 16755 0
Relation Type Duplicate of
avatar joomla-cms-bot joomla-cms-bot - close - 30 Jun 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 30 Jun 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Jun 2017

closed as stated above.


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

avatar Sieger66
Sieger66 - comment - 2 Jul 2017

Is not a bug because see also #9464

@Webdongle

Steps to reproduce the issue
Create a Layout override for Category Blog

I dont know your Issue 16926 come from the same bug as is noticed in the Pull Request(PR) 16755.
PR 16755 is a new feature and sollution to make it easy to use an
Alterative-Article-Layout-Override
in a article-category-list-menuitem

This Alternative Layout is working for the view of a single Article
(view after if you click on a article of the article-category-list)

In PR 16755 it is only a little inconsistence of the "Alternative Layout for Article"-field.
But the rest works as expected.

But if i understand your issue right do you want a Alternative-Category-Blog-Layout-Override.

A quick solution for this:

Version 1:
This for a category of articles in alternative-blog-view:
After you have make a correct override (without xml-file) in templates/templat_name/html/com_content/category/
then you can go in backend to:
Content -> Categories -> (yourCategorie) -> Options -> Layout - select your Alternative-Layout-Override
for this categorie and save it. It make for me no sense to have an xml-file for this because the view comes from the categorie and not from a menuitem how works with the xml.

Version 2:
This for a Alternative Menu item Type for category of articles in blog-view:
After you have make a correct override (with xml-file) in templates/templat_name/html/com_content/category/
then you can go in backend to:
Menus -> (yourMenu) -> New -> Select -> Articles -> (yourOverride)
to create a menuitem with this Layout.

Version 3 :
If you need the same Layout for both then you can make two layouts(copy)
one layout with xml and one without xml with the "same" in it.
For example:
my-blog-layout-duplikat.php
my-blog-layout-duplikat.xml
my-blog-layout-duplikat_children.php
my-blog-layout-duplikat_item.php
my-blog-layout-duplikat_links.php

my-blog-layout.php
my-blog-layout_children.php
my-blog-layout_item.php
my-blog-layout_links.php

avatar Webdongle
Webdongle - comment - 2 Jul 2017

Version 1:
This for a category of articles in alternative-blog-view:
After you have make a correct override (without xml-file) in templates/templat_name/html/com_content/category/
then you can go in backend to:
Content -> Categories -> (yourCategorie) -> Options -> Layout - select your Alternative-Layout-Override
for this categorie and save it. It make for me no sense to have an xml-file for this because the view comes from the categorie and not from a menuitem how works with the xml.

But the problem is that once an xml file is created then the option for that layout disappears in categories.

your version 2 ... same But the problem is that once an xml file is created then the option for that layout disappears in categories

Your version 3 same But the problem is that once an xml file is created then the option for that layout disappears in categories

avatar Sieger66
Sieger66 - comment - 2 Jul 2017

@Webdongle

But the problem is that once an xml file is created then the option for that layout disappears in categories.

This is intended read #9464
Version 1 is an alternative-category-blog-layout-override (without the xml-file)

Your version 3 same But the problem is that once an xml file is created then the option for that layout disappears in categories

You dont need this in categories because you have the self layout in the files and can choose
my-blog-layout

If you created my-blog-layout.php then you can copy this file to my-blog-layout-duplikat.php
similar with
my-blog-layout_children.php
my-blog-layout_item.php
my-blog-layout_links.php

Notice:
my-blog-layout-duplikat
is the alternative-catergory-blog-layout-override
that you can select as an menuitem and have then the self layout as in
my-blog-layout

Add a Comment

Login with GitHub to post a comment