Override - how it works?

Support help forum dedicated to free and commerical templates for Joomla 3 and 2.5 version.
GK User
Mon Jan 25, 2016 7:53 am
How does Override works and what is the correct way of using it. I understand Overrides inject a custom or extra code. I would like to know the preferred method and what they depend on as in forums I can see different methods of using it.
Here are few point I'm confused about:
  • What is the difference between adding override code in extensions>templates>styles>advanced settings>custom CSS code box (code stored in database?) and editing override.css via extensions>templates>templates> /html/com_content/categories/default_items.php (code stored in file?)
  • Which above method will sustain the code when updating template to latest version?
  • What does creating overrides (using via extensions>templates>templates>create Override tab) in folder do? (screenshot bellow)
Thank you for clarification
User avatar
Expert Boarder

Thu Jan 28, 2016 1:19 pm

Custom CSS field in template configuration is stored in database, but it also has a higher priority as code from this field is loaded as last, so can overrwrite pretty much every style used previously. Will not be removed during template update.

override.css file is loaded as last, but still before Custom CSS field from configuration. Easy to manage when You are using some text editor to add changes (template's Custom CSS field doesn't give that option). During template update this file will be overwritten, but it's much easier to simply keep this one file separated during update and replace it after.

I've never been using this 3rd option, so it would be better if You ask joomla support about that.
User avatar

Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.