astridx/meinblog

en/joomla-template-css-overrides-und-chrome

Opened this issue · 3 comments

Joomla 4.x-Tutorial - Extension Development - Template - Overrides - Alternative Overrides and Modules Chrome | Astrid Günther

In this chapter we will change the output of the extensions in the frontend. In Joomla this is done using overrides, alternative overrides…

https://blog.astrid-guenther.de/en/joomla-template-css-overrides-und-chrome

Hello Astrid,

Thank you for this article.

I'm starting to worry about updating my Joomla! 3 to Joomla! 4 (4.0.6 at the time of posting this).

In Joomla! 3 I used a lot the functionality that allows to create article layout overrides by duplicating and renaming the files located in components/com_content/views/article/tmpl to the html folder of my custom themes (often created from the Bl4nk Blogger Schmidt template based on Bootstrap 4 https://github.com/Bloggerschmidt/Bl...tstrap-Edition).
Then, by adding beside copied and renamed files, the updated xml file, the personalized layout becomes available from the component menu Article.
See paragraph n°7 of the J!3 doc which has been my reference for a long time: https://docs.joomla.org/J3.x:Layout_...ive_Menu_Items

I tried to reproduce this method in Joomla! 4, but if I can select article override in the Article component menu of Joomla! 4 (the reference appears well in the list as for example COM_CONTENT_ARTICLE_VIEW_HERO_TITLE), this override does not seem to be taken into account in the frontend. The default article layout still seems to be used.

Can I still keep working this way in Joomla! 4 ?

Thank you

The overrides are, in my opinion, one of the most important elements in Joomla and nothing basicly has actually changed there. Maybe you have a typo. That happens to me often. Please check your spelling of the file name again. To avoid typos I sometimes use the template manager to create the override.
Something that was not logical to me is the behavior described in this issue. I am not sure if it is still the case.
joomla/joomla-cms#15547
You don't mean that, do you?

Thank you for your feedback.

By testing a bit more, I found that this override method still works in Cassiopeia.
It seems that in my Joomla! 3 template something is no longer compatible with Joomla! 4.
It's time for me to learn how to create a Joomla! 4 template.
If you have resources on this subject I am a taker.
Thank you