I want to create a custom layout for my category. I've read the tutorial about https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_coreand https://docs.joomla.org/Layout_Overrides_in_Joomla, but I find it very confusing.

I've tested this on a brand new 3.9.4 Joomla installation. Here is what I did: 1) Go to Protostar's template manager and create a category override for com_content, now my template folder structure looks like


2) Now I want to create an override based on the blog layout, so I duplicate blog.php and rename it to wsk.php 3) So far so good. Now I can set my layout under articles->options->Category->Choose a layout:

enter image description here

Also, I can set my layout under content->Categories->[i]category_name[/i]->Options Tab:

enter image description here

4) Now I make some change to wsk.php and then create a new menu item with category blog layout, but it is still using "templates/protostar/html/com_content/category/blog.php" instead of my layout.

I think the problem here is the layout settings in article option and category setting are overridden by menu item setting, however, for menu item type, I can only choose between "blog" and "list", but not my own layout.

I understand that I can just edit "templates/protostar/html/com_content/category/blog.php" to achieve my own layout, but I am a little obsessed with using my own layout. Besides, if there is no obvious way to use my own layout, why have it as an option under article option and category setting? Did I miss anything here?

  • @sheenken, in response to a question asked week, joomla.stackexchange.com/questions/24420/… I described how I created my own alternate category list layout which is more or less what you are trying to do here. I found changing the Layout in the category didn't work as you have shown so I used the Menu to select the alternate layout. You have copied the blog, in my example I copied the list, but otherwise it will function the same. – Irata Apr 8 '19 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.