Archived

Difference between revisions of "How to override the output from the Joomla! core"

From Joomla! Documentation

Line 1: Line 1:
{{inuse}}
 
 
The standard output from the Joomla! core can be overridden by adding code to the html directory in a template. Basic overrides include: <code>your_template/html/modules.php</code> (overriding module output) and <code>your_template/html/pagination.php</code> (overriding pagination output); however, it is possible to override the output of any module or component.
 
The standard output from the Joomla! core can be overridden by adding code to the html directory in a template. Basic overrides include: <code>your_template/html/modules.php</code> (overriding module output) and <code>your_template/html/pagination.php</code> (overriding pagination output); however, it is possible to override the output of any module or component.
  
 
==Getting A Head-Start with Overrides==
 
==Getting A Head-Start with Overrides==
Joomla! comes pre-packaged with a frontend template called Beez. Beez utilizes template overrides to produce a table-less layout for faster, smoother, and semantically correct markup. To add the table-less layout to your template, locate your Joomla! installation's template directory, and you'll notice the Beez template. Inside the Beez template directory, copy the folder titled <code>html</code> (the entire directory structure is as follows: <code>your_joomla/templates/Beez/html/</code>) and paste the html folder into your template's main directory.
+
Joomla! comes pre-packaged with a frontend template called Beez. Beez utilizes template overrides to produce a table-less layout for faster, smoother, and semantically correct markup. To add the table-less layout to your template, locate your Joomla! installation's template directory, and you'll notice the Beez template. Inside the Beez template directory, copy the folder titled <code>html</code> (the entire directory structure is as follows: <code>your_joomla/templates/Beez/html/</code>) and paste the html folder into your template's main directory. After copying Beez's html folder to your template, you must add the following code to your template's <code>templatedetails.xml</code> file (in between the <code><files></code> and <code></files></code> tags):
 +
<pre>
 +
<filename>html/com_contact/category/default.php</filename>
 +
<filename>html/com_contact/category/default_items.php</filename>
 +
<filename>html/com_contact/category/index.html</filename>
 +
<filename>html/com_contact/contact/default.php</filename>
 +
<filename>html/com_contact/contact/default_address.php</filename>
 +
<filename>html/com_contact/contact/default_form.php</filename>
 +
<filename>html/com_contact/contact/index.html</filename>
 +
<filename>html/com_contact/index.html</filename>
 +
<filename>html/com_content/article/default.php</filename>
 +
<filename>html/com_content/article/index.html</filename>
 +
<filename>html/com_content/article/form.php</filename>
 +
<filename>html/com_content/category/blog.php</filename>
 +
<filename>html/com_content/category/blog_item.php</filename>
 +
<filename>html/com_content/category/blog_links.php</filename>
 +
<filename>html/com_content/category/index.html</filename>
 +
<filename>html/com_content/category/default_items.php</filename>
 +
<filename>html/com_content/category/default.php</filename>
 +
<filename>html/com_content/frontpage/default.php</filename>
 +
<filename>html/com_content/frontpage/default_item.php</filename>
 +
<filename>html/com_content/frontpage/default_links.php</filename>
 +
<filename>html/com_content/frontpage/index.html</filename>
 +
<filename>html/com_content/section/blog.php</filename>
 +
<filename>html/com_content/section/blog_item.php</filename>
 +
<filename>html/com_content/section/blog_links.php</filename>
 +
<filename>html/com_content/section/default.php</filename>
 +
<filename>html/com_content/section/index.html</filename>
 +
<filename>html/com_content/index.html</filename>
 +
<filename>html/index.html</filename>
 +
<filename>html/com_search/search/default.php</filename>
 +
<filename>html/com_search/search/default_error.php</filename>
 +
<filename>html/com_search/search/default_form.php</filename>
 +
<filename>html/com_search/search/default_results.php</filename>
 +
<filename>html/com_search/search/index.html</filename>
 +
<filename>html/com_search/index.html</filename>
 +
<filename>html/editor_content.css</filename>
 +
<filename>html/mod_latestnews/default.php</filename>
 +
<filename>html/mod_latestnews/index.html</filename>
 +
<filename>html/mod_login/default.php</filename>
 +
<filename>html/mod_login/index.html</filename>
 +
<filename>html/mod_newsflash/_item.php</filename>
 +
<filename>html/mod_newsflash/default.php</filename>
 +
<filename>html/mod_newsflash/horiz.php</filename>
 +
<filename>html/mod_newsflash/vert.php</filename>
 +
<filename>html/mod_newsflash/index.html</filename>
 +
<filename>html/mod_poll/default.php</filename>
 +
<filename>html/mod_poll/index.html</filename>
 +
<filename>html/mod_search/default.php</filename>
 +
<filename>html/mod_search/index.html</filename>
 +
<filename>html/modules.php</filename>
 +
<filename>html/pagination.php</filename>
 +
<filename>html/com_poll/poll/default.php</filename>
 +
<filename>html/com_poll/poll/default_graph.php</filename>
 +
<filename>html/com_poll/poll/index.html</filename>
 +
<filename>html/com_poll/index.html</filename>
 +
<filename>html/com_newsfeeds/categories/default.php</filename>
 +
<filename>html/com_newsfeeds/categories/index.html</filename>
 +
<filename>html/com_newsfeeds/category/default.php</filename>
 +
<filename>html/com_newsfeeds/category/default_items.php</filename>
 +
<filename>html/com_newsfeeds/category/index.html</filename>
 +
<filename>html/com_newsfeeds/newsfeed/default.php</filename>
 +
<filename>html/com_newsfeeds/newsfeed/index.html</filename>
 +
<filename>html/com_newsfeeds/index.html</filename>
 +
<filename>html/com_weblinks/categories/default.php</filename>
 +
<filename>html/com_weblinks/categories/index.html</filename>
 +
<filename>html/com_weblinks/category/default.php</filename>
 +
<filename>html/com_weblinks/category/default_items.php</filename>
 +
<filename>html/com_weblinks/category/index.html</filename>
 +
<filename>html/com_weblinks/weblinks/form.php</filename>
 +
<filename>html/com_weblinks/weblinks/index.html</filename>
 +
<filename>html/com_weblinks/index.html</filename>
 +
<filename>html/com_user/user/index.html</filename>
 +
<filename>html/com_user/user/default.php</filename>
 +
<filename>html/com_user/user/form.php</filename>
 +
<filename>html/com_user/login/index.html</filename>
 +
<filename>html/com_user/login/default_login.php</filename>
 +
<filename>html/com_user/login/default.php</filename>
 +
<filename>html/com_user/login/default_logout.php</filename>
 +
<filename>html/com_user/register/default.php</filename>
 +
<filename>html/com_user/register/index.html</filename>
 +
<filename>html/com_user/register/default_message.php</filename>
 +
<filename>html/com_user/index.html</filename>
 +
<filename>html/com_user/remind/index.html</filename>
 +
<filename>html/com_user/remind/default.php</filename>
 +
<filename>html/com_user/remind/default_message.php</filename>
 +
<filename>html/com_user/reset/index.html</filename>
 +
<filename>html/com_user/reset/default.php</filename>
 +
<filename>html/com_user/reset/confirm.php</filename>
 +
<filename>html/com_user/reset/complete.php</filename>
 +
</pre>
  
 
Detail to follow
 
Detail to follow
 
[[Category:Templates]]
 
[[Category:Templates]]

Revision as of 21:01, 19 January 2008

This page has been archived. This page contains information for an unsupported Joomla! version or is no longer relevant. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

The standard output from the Joomla! core can be overridden by adding code to the html directory in a template. Basic overrides include: your_template/html/modules.php (overriding module output) and your_template/html/pagination.php (overriding pagination output); however, it is possible to override the output of any module or component.

Getting A Head-Start with Overrides[edit]

Joomla! comes pre-packaged with a frontend template called Beez. Beez utilizes template overrides to produce a table-less layout for faster, smoother, and semantically correct markup. To add the table-less layout to your template, locate your Joomla! installation's template directory, and you'll notice the Beez template. Inside the Beez template directory, copy the folder titled html (the entire directory structure is as follows: your_joomla/templates/Beez/html/) and paste the html folder into your template's main directory. After copying Beez's html folder to your template, you must add the following code to your template's templatedetails.xml file (in between the <files> and </files> tags):

		<filename>html/com_contact/category/default.php</filename>
		<filename>html/com_contact/category/default_items.php</filename>
		<filename>html/com_contact/category/index.html</filename>
		<filename>html/com_contact/contact/default.php</filename>
		<filename>html/com_contact/contact/default_address.php</filename>
		<filename>html/com_contact/contact/default_form.php</filename>
		<filename>html/com_contact/contact/index.html</filename>
		<filename>html/com_contact/index.html</filename>
		<filename>html/com_content/article/default.php</filename>
		<filename>html/com_content/article/index.html</filename>
		<filename>html/com_content/article/form.php</filename>
		<filename>html/com_content/category/blog.php</filename>
		<filename>html/com_content/category/blog_item.php</filename>
		<filename>html/com_content/category/blog_links.php</filename>
		<filename>html/com_content/category/index.html</filename>
		<filename>html/com_content/category/default_items.php</filename>
		<filename>html/com_content/category/default.php</filename>
		<filename>html/com_content/frontpage/default.php</filename>
		<filename>html/com_content/frontpage/default_item.php</filename>
		<filename>html/com_content/frontpage/default_links.php</filename>
		<filename>html/com_content/frontpage/index.html</filename>
		<filename>html/com_content/section/blog.php</filename>
		<filename>html/com_content/section/blog_item.php</filename>
		<filename>html/com_content/section/blog_links.php</filename>
		<filename>html/com_content/section/default.php</filename>
		<filename>html/com_content/section/index.html</filename>
		<filename>html/com_content/index.html</filename>
		<filename>html/index.html</filename>
		<filename>html/com_search/search/default.php</filename>
		<filename>html/com_search/search/default_error.php</filename>
		<filename>html/com_search/search/default_form.php</filename>
		<filename>html/com_search/search/default_results.php</filename>
		<filename>html/com_search/search/index.html</filename>
		<filename>html/com_search/index.html</filename>
		<filename>html/editor_content.css</filename>
		<filename>html/mod_latestnews/default.php</filename>
		<filename>html/mod_latestnews/index.html</filename>
		<filename>html/mod_login/default.php</filename>
		<filename>html/mod_login/index.html</filename>
		<filename>html/mod_newsflash/_item.php</filename>
		<filename>html/mod_newsflash/default.php</filename>
		<filename>html/mod_newsflash/horiz.php</filename>
		<filename>html/mod_newsflash/vert.php</filename>
		<filename>html/mod_newsflash/index.html</filename>
		<filename>html/mod_poll/default.php</filename>
		<filename>html/mod_poll/index.html</filename>
		<filename>html/mod_search/default.php</filename>
		<filename>html/mod_search/index.html</filename>
		<filename>html/modules.php</filename>
		<filename>html/pagination.php</filename>
		<filename>html/com_poll/poll/default.php</filename>
		<filename>html/com_poll/poll/default_graph.php</filename>
		<filename>html/com_poll/poll/index.html</filename>
		<filename>html/com_poll/index.html</filename>
		<filename>html/com_newsfeeds/categories/default.php</filename>
		<filename>html/com_newsfeeds/categories/index.html</filename>
		<filename>html/com_newsfeeds/category/default.php</filename>
		<filename>html/com_newsfeeds/category/default_items.php</filename>
		<filename>html/com_newsfeeds/category/index.html</filename>
		<filename>html/com_newsfeeds/newsfeed/default.php</filename>
		<filename>html/com_newsfeeds/newsfeed/index.html</filename>
		<filename>html/com_newsfeeds/index.html</filename>
		<filename>html/com_weblinks/categories/default.php</filename>
		<filename>html/com_weblinks/categories/index.html</filename>
		<filename>html/com_weblinks/category/default.php</filename>
		<filename>html/com_weblinks/category/default_items.php</filename>
		<filename>html/com_weblinks/category/index.html</filename>
		<filename>html/com_weblinks/weblinks/form.php</filename>
		<filename>html/com_weblinks/weblinks/index.html</filename>
		<filename>html/com_weblinks/index.html</filename>
		<filename>html/com_user/user/index.html</filename>
		<filename>html/com_user/user/default.php</filename>
		<filename>html/com_user/user/form.php</filename>
		<filename>html/com_user/login/index.html</filename>
		<filename>html/com_user/login/default_login.php</filename>
		<filename>html/com_user/login/default.php</filename>
		<filename>html/com_user/login/default_logout.php</filename>
		<filename>html/com_user/register/default.php</filename>
		<filename>html/com_user/register/index.html</filename>
		<filename>html/com_user/register/default_message.php</filename>
		<filename>html/com_user/index.html</filename>
		<filename>html/com_user/remind/index.html</filename>
		<filename>html/com_user/remind/default.php</filename>
		<filename>html/com_user/remind/default_message.php</filename>
		<filename>html/com_user/reset/index.html</filename>
		<filename>html/com_user/reset/default.php</filename>
		<filename>html/com_user/reset/confirm.php</filename>
		<filename>html/com_user/reset/complete.php</filename>

Detail to follow