Start a conversation

A Beginners Guide to Addon Overrides

Here's the Charity Addon we're going to modify in this example. We're going to change style of Charity in the article view.

  • Login to your site's files and browser to the /components/com_tz_portfolio_plus folder.
  • Look for the /addons/ folder.
  • Addon-type of Charity is Content, so you look for the /content/ folder
  • You will see /charity/ folder
  • Inside the /charity/ folder, you'll hopefully find a /views/ folder. If there isn't, your addon won't support overrides.
  • Inside the /views/ folder, you may find several subfolders. Normally each one is logically named, according to the part of the component that they modify.
  • Look inside these folders and the /tmpl/ folders they contain . Look for the layout file you want to alter. In our example, the file is /article/tmpl/default.php.

  • Browse to your /templates/ folder.
  • Open the folder for your current template. In this example, our template is /tz_stchrist/.
  • Open the /html/ folder.
  • Inside the /html/ folder, create a new folder with the name is com_tz_portfolio_plus.
  • Create a subfolder inside /com_tz_portfolio_plus/, matching the subfolder of the original component. In this case, that's /article/.
  • Create a subfolder inside /article/, match with structure "plg_[addon_type]_[addon_name]". In this case, that's /plg_content_charity/.
  • Upload the layout file to this new folder.

  • You can now edit the layout file. In this example, I add bootstrap style and change background-color to orange.
  • Save the file and your change will be visible:

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Sonny Le

  2. Posted
  3. Updated

Comments