0

It is possible to create an alternative article layout in the folder com_content / article (of course not written with an underscore, but with hyphens it works).

But when I try the same procedure within the folder com_content / featured, I get no option to choose this layout in my controll-center.

What are the reasons for this exception?

  • are you making your changes in the actual com_content folder or using the Joomla override libraries as part of the template? – Irata Aug 3 at 9:57
  • Thanks for your question. I am using overrides in the html folder as part of a custom template. I am experienced with Joomla template overrides. I am trying this one (folder) the first time and I'm stuck. – Oliver Aug 3 at 13:28
1

In your directory: /templates/yourtemplate/html/com_content/featured/

You need to create both a template file and XML file with matching names - eg. custom-featured.php and custom-featured.xml - for this task, you can copy the existing default.php and default.xml as a base point. If you then create a new menu item, your Custom Featured will become a menu type option under Articles.

| improve this answer | |
  • Thank you. But this is not helpful. I don't want create a menu-item. I want to achieve a simple template override for (blog) articles that are flagged as featured. – Oliver Aug 6 at 6:00
  • articles and featured are two different views. You cannot create a view for featured and expect it to render in the articles view, at least, not without some hideous hacking at Joomla's core. Sounds like you want to create a custom article template - using the same methodology in my answer above, the featured flag is available in that context so you can do whatever you please with it in the template. – Grant G Aug 6 at 8:24
  • Now i got it! Thank you so much. – Oliver Aug 7 at 10:08
  • @Oliver is this page resolved? If Grant's answer doesn't contain the resolving advice, please inform him of what needs to be updated so that you can award the green tick to this answer. Alternatively, if you wish to post a new answer detailing how you resolved this question, you are welcome to do so and award your own answer the green tick. Thank you in advance for progressing this page to a system-recognised resolution (so that the system stops "bumping" this page). – mickmackusa Sep 4 at 3:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.