Knowledge Base - Joomla Template Overrides
- Created: Saturday, 22 November 2014
- Last Modified: Saturday, 22 November 2014
These are basic notes about constructing template overrides for Joomla.
Template vs Layout
TEMPLATE provides structural framework
LAYOUT controls output within template regions (ie module position)
MVC = Model View Controller
Component example: httpdocs/components/com_content/views/article/tmpl/default.php
Module example: httpdocs/modules/mod_login/tmpl/default.php
Component example: httpdocs/templates/protostar/html/com_content/article/default.php
Module example: httpdocs/templates/protostar/html/mod_login/default.php
Override structure: httpdocs/templates/protostar/html/com_content/article/default_links.php
Resources:
Quick Tutorial - http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
Detailed Overview - http://docs.joomla.org/Understanding_Output_Overrides
MVC Overview - http://docs.joomla.org/Model-View-Controller
About Helpers:
http://docs.joomla.org/Tutorial:Creating_a_Hello_World_Module_for_Joomla_1.5
http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1
"V" OF MVC = VIEW (GENERATES OUTPUT)
Template vs Layout
TEMPLATE provides structural framework
LAYOUT controls output within template regions (ie module position)
MVC = Model View Controller
EXTENSION DIRECTORY STRUCTURE OF LAYOUT
Joomla_root / components / extension_directory_name / views / view_name / tmpl / layout_fileComponent example: httpdocs/components/com_content/views/article/tmpl/default.php
Module example: httpdocs/modules/mod_login/tmpl/default.php
OVERRIDE DIRECTORY STRUCTURE OF LAYOUT
Joomla_root / your_template / html / extension_directory_name / view_name / layout_fileComponent example: httpdocs/templates/protostar/html/com_content/article/default.php
Module example: httpdocs/templates/protostar/html/mod_login/default.php
SUB-LAYOUTS
Extension structure: httpdocs/components/com_content/views/article/tmpl/default_links.phpOverride structure: httpdocs/templates/protostar/html/com_content/article/default_links.php
Resources:
Quick Tutorial - http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
Detailed Overview - http://docs.joomla.org/Understanding_Output_Overrides
MVC Overview - http://docs.joomla.org/Model-View-Controller
About Helpers:
http://docs.joomla.org/Tutorial:Creating_a_Hello_World_Module_for_Joomla_1.5
http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1