? No Code Attached Yet
avatar joomleb
joomleb
11 Mar 2022

Discussed in #35030

Originally posted by joomleb August 2, 2021
Hi guys,
about content Layouts, in Joomla these settings we have these settings and would be very good to add (in bold):

  • Content > Options > Articles > Choose a Layout: the option Inherit from Category setting will appear
  • Content > Options > Categories > Choose a Layout
  • Content > Options > Categories > to add the Choose an Article Layout field
  • Articles > Options > Layout: ....the option (from Global Options) Inherit from Category setting will appear
  • Categories > Options > Layout: ....

With this simple setting we can assign “automatically” the Layout for all the items of a Category. A must when we think on special contents by using Custom Fields and the Frontend usage.

Really Powerful and so simple that I would consider it a lack, a fix, mostly with Child Templates feature part of last Joomla 4.1 release,

In my opinion it should be added already for the 4.1.x release to complete that feature...

Are you agree ?

avatar joomleb joomleb - open - 11 Mar 2022
avatar joomla-cms-bot joomla-cms-bot - change - 11 Mar 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Mar 2022
avatar brianteeman
brianteeman - comment - 11 Mar 2022

When you create a category menu (blog or list) and chose a layout there for the items how is this different

avatar joomleb
joomleb - comment - 11 Mar 2022

Hi Brian,
I believe that if you pay attention to bold parts sure you understand better than by reading my words:

Content > Options > Articles > Choose a Layout: the option Inherit from Category setting will appear
Content > Options > Categories > Choose a Layout
Content > Options > Categories > to add the Choose an Article Layout field
Articles > Options > Layout: ....the option (from Global Options) Inherit from Category setting will appear
Categories > Options > Layout: ....

With this simple setting we can assign “automatically” the Layout for all the items of a Category. A must when we think on special contents by using Custom Fields and the Frontend usage.

Anyway,, I could say:

First: you don't need to create a menu item, it's a category / article option setting, not a menu item one.

Second: In general, and in case they are used, the options of the menu items have the ability to overwrite or not the settings present in the options (in this case options of the categories and / or articles)

Third: it is the other side of the mirror that must also be seen, from the point of view of the article which may or may not automatically follow the layout set for the category

Total, practical simple example, a Blog or List menu item (not necessary for the function) could show articles of different categories, each category have its own layout, therefore the articles belonging to the different categories shown with different layouts ... (not and doesn't matter the Blog or List menu item layout, in this case)

avatar brianteeman
brianteeman - comment - 11 Mar 2022

To answer each of your points

  1. You always need a menu item
  2. see above
  3. already possible without this
  4. a blog or list menu can not show content from more than one category.

So either you dont understand how to use Joomla or I misunderstand you

avatar joomleb
joomleb - comment - 11 Mar 2022

Hi Brian,
sure with a little calm we can explain:
1 - Sure? Just for ex. I Could use a 3d Extension to show all my selected articles (by categories, tags, articles etc.) into a Google Map that link and open the Article in a new page...
3 - Can I set ?

  • Content > Options > Articles > Choose a Layout: the option Inherit from Category setting
  • Content > Options > Categories > Choose an Article Layout field: (the Article Layout for all items of this Category)
  • Articles > Options > Layout: ....the option (from Global Options) Inherit from Category setting

4 - A Category can have unlimited Subcategories (that simply are Categories into Categories)

Use case example:
I give frontend access to some users that can create "Articles" into the Category "Animals"
The Category Animals have 3 sub Categories: birds, dogs, cats
To each sub Category I assign a specific Layout (for ex. assigning specific colors and to better order the Custom Fields I used for each sub Category)
With (please, refer to the complete list above to understand what is missing now in Joomla configuration):

  • Content > Options > Articles > Choose a Layout: the option Inherit from Category setting
  • Content > Options > Categories > Choose an Article Layout field: Dogs Layout
  • Articles > Options > Layout: ....the option (from Global Options) Inherit from Category setting

When user creating the Article "Super Dog" assigning it to its sub Category (("Dogs"), the Dogs layout will be automatically applied to the Article page...

avatar brianteeman
brianteeman - comment - 11 Mar 2022

To each sub Category I assign a specific Layout

No need for new code just create sub menus

You are reinventing a wheel when it is already round

avatar chmst chmst - change - 13 Mar 2022
Labels Added: ?
avatar chmst chmst - labeled - 13 Mar 2022
avatar brianteeman
brianteeman - comment - 15 Apr 2022

For me this is the eexpected behaviour and should be closed.

avatar joomleb
joomleb - comment - 15 Apr 2022

Hi @brianteeman
I believe that the problem here is due to the fact that I have not been able to explain myself well.
Before closing, Please, give me a week (I'm out of the office) that I try to rephrase the request in a clearer form...

avatar brianteeman
brianteeman - comment - 5 Jul 2022

, Please, give me a week

has it been a week yet ? ;)

Add a Comment

Login with GitHub to post a comment