- mercromina responded to »error when i try to upgrade to the last version of dizkus module (3.1)« 08:01 PM
- craigh responded to »TagIt 3.0 for Zikula« 03:58 PM
- localrags responded to »Remove contents of nuke_sc_anticracker from Database« 11:30 AM
- jmvaughn responded to »Shoutit for zikula 1.3?« 09:31 AM
- mdee responded to »Different page content under one template (tpl file) based on URL« 07:17 AM
- espaan responded to »Categories disappear when editing ...« 08. Feb
- eledril responded to »How decrease zikula cpu usage« 08. Feb
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Wiki » TemplateOverridng
Additions
note: as of Zikula 1.2.1 the andreas08 theme should be working properly, the issue was related to a case mismatch between the defined name and the folder name
Additions
Template Overrides
Modules and blocks provide HTML/XHTML templates for presenting their output. Most themes also provide templates for at least certain modules and blocks; the theme's templates are used in preference to those provided by the modules and blocks in question.
However, the design of those templates might not fit your likes or needs. You could possibly edit the templates standardly provided by the blocks, modules or themes and customize them. But when those blocks, modules and themes get updated - by a new version, for example - your changes will be overwritten. You could, of course, go through a complex, time-consuming and error-prone process of backing-up your custom templates from all the different directories and restoring them afterwards.
Instead, Zikula provides a better solution: create your custom templates in one location that Zikula recognizes, and Zikula will automatically use your custom templates instead of the templates that would otherwise be used. This is referred to as a 'template override'.
By producing your own overriding template, you can customize any layout provided by any Zikula module, block or theme.
There are two types of template override:
- the global override;
- the theme-specific override.
You can also override many parts of your display:
- templates
- stylesheets
- images
- plugins
- functions
- workflows
- languages
- blocks
- classes
Global Template Overrides
Global template overrides allow you to customize a piece of layout for all themes, i.e. no matter what theme is applied to your site. Any template (provided by a module, block or theme) that would normally be used for that piece of layout will be replaced by your custom template.
You put your custom templates in the directory /config/templates/<template path>
The <template path> will depend on which template being overridden. For example, let's say you want to override the template:
/modules/Example/pntemplates/example_user_display.htm
To do so, create your own custom template called example_user_display.htm in:
/config/templates/Example/
Therefore, the full path to and name of your custom template will be:
/config/templates/Example/example_user_display.htm
That's it. There's nothing else you need to do. Zikula will find and use your template automatically.
Theme-Specific Template Overrides
Even though all modules and blocks that produce on-screen output provide templates for displaying that output, themes can provide their own templates that get used in preference to the equivalent templates provided by the modules and blocks.
You might want to customize the templates used with a particular theme, but without affecting the templates used by any other theme installed.
A theme-specific template override lets you customize a piece of layout for one theme only.
With every other theme that might be installed on your site, the template that will be used will be:
- either the template provided by the theme for application to a particular module or block;
- or, if the theme doesn't provide a template, the template provided by the module or block.
Theme-specific template overrides are located in the following directory:
/themes/<theme name>/templates/modules/<template path>
Again the <template path> depends on which template being overridden. Let's say that, when the theme used is 'andreas08', you want to override the following template from the Example module:
/modules/Example/pntemplates/example_user_display.htm
In this case, you need to create a your own template called example_user_display.htm in the directory:
/themes/andreas08/templates/modules/Example/
Therefore, the name of and full path to the new template will be:
/themes/andreas08/templates/modules/Example/example_user_display.htm
That's it. Zikula will find and use your custom template automatically.
Stylesheet Overrides
You can override stylesheets in exactly the same manner as templates. Place your new style sheet in one of these two locations:/themes/andreas08/style/Example/style.css /config/styles/Example/style.css
note: as of 9May2009? the andreas08 theme doesn't actually work, but other themes do
Deletions
Template Overrides
Modules and blocks provide HTML/XHTML templates for presenting their output. Most themes also provide templates for at least certain modules and blocks; the theme's templates are used in preference to those provided by the modules and blocks in question.
However, the design of those templates might not fit your likes or needs. You could possibly edit the templates standardly provided by the blocks, modules or themes and customize them. But when those blocks, modules and themes get updated - by a new version, for example - your changes will be overwritten. You could, of course, go through a complex, time-consuming and error-prone process of backing-up your custom templates from all the different directories and restoring them afterwards.
Instead, Zikula provides a better solution: create your custom templates in one location that Zikula recognizes, and Zikula will automatically use your custom templates instead of the templates that would otherwise be used. This is referred to as a 'template override'.
By producing your own overriding template, you can customize any layout provided by any Zikula module, block or theme.
There are two types of template override:
- the global override;
- the theme-specific override.
Global Template Overrides
Global template overrides allow you to customize a piece of layout for all themes, i.e. no matter what theme is applied to your site. Any template (provided by a module, block or theme) that would normally be used for that piece of layout will be replaced by your custom template.
You put your custom templates in the directory /config/templates/<template path>
The <template path> will depend on which template being overridden. For example, let's say you want to override the template:
/modules/Example/pntemplates/example_user_display.htm
To do so, create your own custom template called example_user_display.htm in:
/config/templates/Example/
Therefore, the full path to and name of your custom template will be:
/config/templates/Example/example_user_display.htm
That's it. There's nothing else you need to do. Zikula will find and use your template automatically.
Theme-Specific Template Overrides
Even though all modules and blocks that produce on-screen output provide templates for displaying that output, themes can provide their own templates that get used in preference to the equivalent templates provided by the modules and blocks.
You might want to customize the templates used with a particular theme, but without affecting the templates used by any other theme installed.
A theme-specific template override lets you customize a piece of layout for one theme only.
With every other theme that might be installed on your site, the template that will be used will be:
- either the template provided by the theme for application to a particular module or block;
- or, if the theme doesn't provide a template, the template provided by the module or block.
Theme-specific template overrides are located in the following directory:
/themes/<theme name>/templates/modules/<template path>
Again the <template path> depends on which template being overridden. Let's say that, when the theme used is 'andreas08', you want to override the following template from the Example module:
/modules/Example/pntemplates/example_user_display.htm
In this case, you need to create a your own template called example_user_display.htm in the directory:
/themes/andreas08/templates/modules/Example/
Therefore, the name of and full path to the new template will be:
/themes/andreas08/templates/modules/Example/example_user_display.htm
That's it. Zikula will find and use your custom template automatically.
Additions
That's it. There's nothing else you need to do. Zikula will find and use your template automatically. That's it. Zikula will find and use your custom template automatically.
Deletions
That's it. There's nothing else you need to do. Zikula will find your template automatically.
That's it. Zikula will find your custom template automatically.
Additions
That's it. There's nothing else you need to do. Zikula will find your template automatically.
Deletions
That's it. There's nothing else you need to do. Zikula will find your templates automatically.
Additions
Template Overrides
Modules and blocks provide HTML/XHTML templates for presenting their output. Most themes also provide templates for at least certain modules and blocks; the theme's templates are used in preference to those provided by the modules and blocks in question.However, the design of those templates might not fit your likes or needs. You could possibly edit the templates standardly provided by the blocks, modules or themes and customize them. But when those blocks, modules and themes get updated - by a new version, for example - your changes will be overwritten. You could, of course, go through a complex, time-consuming and error-prone process of backing-up your custom templates from all the different directories and restoring them afterwards.
Instead, Zikula provides a better solution: create your custom templates in one location that Zikula recognizes, and Zikula will automatically use your custom templates instead of the templates that would otherwise be used. This is referred to as a 'template override'.
By producing your own overriding template, you can customize any layout provided by any Zikula module, block or theme.
There are two types of template override:
- the global override;
- the theme-specific override.
Global Template Overrides
Global template overrides allow you to customize a piece of layout for all themes, i.e. no matter what theme is applied to your site. Any template (provided by a module, block or theme) that would normally be used for that piece of layout will be replaced by your custom template.You put your custom templates in the directory /config/templates/<template path>
The <template path> will depend on which template being overridden. For example, let's say you want to override the template:
/modules/Example/pntemplates/example_user_display.htm
To do so, create your own custom template called example_user_display.htm in:
/config/templates/Example/
Therefore, the full path to and name of your custom template will be:
/config/templates/Example/example_user_display.htm
That's it. There's nothing else you need to do. Zikula will find your templates automatically.
Theme-Specific Template Overrides
Even though all modules and blocks that produce on-screen output provide templates for displaying that output, themes can provide their own templates that get used in preference to the equivalent templates provided by the modules and blocks.You might want to customize the templates used with a particular theme, but without affecting the templates used by any other theme installed.
A theme-specific template override lets you customize a piece of layout for one theme only.
With every other theme that might be installed on your site, the template that will be used will be:
- either the template provided by the theme for application to a particular module or block;
- or, if the theme doesn't provide a template, the template provided by the module or block.
/themes/<theme name>/templates/modules/<template path>
Again the <template path> depends on which template being overridden. Let's say that, when the theme used is 'andreas08', you want to override the following template from the Example module:
/modules/Example/pntemplates/example_user_display.htm
In this case, you need to create a your own template called example_user_display.htm in the directory:
/themes/andreas08/templates/modules/Example/
Therefore, the name of and full path to the new template will be:
/themes/andreas08/templates/modules/Example/example_user_display.htm
That's it. Zikula will find your custom template automatically.
Deletions
Template overrides
Template overrides allow for the customization any layout provided by a Zikula module or block. Two types of template overrides exist: global and theme specific.Global template overrides
Global template overrides allow the customization of a piece of layout for all themes. Global template overrides exist so that pieces of layout can be altered without having to modify the base template supplied by the module to ensure that no changes are lost during upgrades of Zikula and/or the module.Global template override are located the directory config/templates/<template path>
The template path will depend on the exact template being overridden. For example to override the template
modules/Example/pntemplates/example_user_display.htm
create a new template in
config/templates/Example/
i.e. the new template is
config/templates/Example/example_user_display.htm
Theme specifc template overrides
Theme specific template overrides allow for the customization of a piece of layout for one theme only. Most themes will supply some default theme specific template overrides - usually for the News module. Theme specific overrides allow for a theme to provide a completely different look and feel to a site.Theme specific template overrides are located in the directory
themes/<theme name>/templates/modules/<template path>
Again the template path is dependent on the template being overriden. Using the same example to override the template
modules/Example/pntemplates/example_user_display.htm
for the theme 'andreas08' create the new template in
themes/andreas08/templates/modules/Example/
i.e. the new template is
themes/andreas08/templates/modules/Example/example_user_display.htm
Additions
for the theme 'andreas08' create the new template in
themes/andreas08/templates/modules/Example/
themes/andreas08/templates/modules/Example/example_user_display.htm
Deletions
for the theme 'andreas08' create the new template in
themes/andreas08/templates/modules/Example/
themes/andreas08/templates/modules/Example/example_user_display.htm
Additions
Global template override are located the directory config/templates/<template path>
modules/Example/pntemplates/example_user_display.htm
config/templates/Example/
config/templates/Example/example_user_display.htm
themes/<theme name>/templates/modules/<template path>
modules/Example/pntemplates/example_user_display.htm
themes/andreas08/templates/modules/Example/
themes/andreas08/templates/modules/Example/example_user_display.htm
Deletions
Global template override are located the directory
config/templates/<template path>
modules/Example/pntemplates/example_user_display.htm
config/templates/Example/
config/templates/Example/example_user_display.htm.
themes/<theme name>/templates/modules/<template path>
modules/Example/pntemplates/example_user_display.htm
themes/andreas08/templates/modules/Example/
themes/andreas08/templates/modules/Example/example_user_display.htm .
Oldest known version of this page was edited on 2006-04-27 14:48:04
by markwest
[ ]
Template overrides allow for the customization any layout provided by a Zikula module or block. Two types of template overrides exist: global and theme specific.
Global template overrides allow the customization of a piece of layout for all themes. Global template overrides exist so that pieces of layout can be altered without having to modify the base template supplied by the module to ensure that no changes are lost during upgrades of Zikula and/or the module.
Global template override are located the directory
The template path will depend on the exact template being overridden. For example to override the template
create a new template in
i.e. the new template is
Theme specific template overrides allow for the customization of a piece of layout for one theme only. Most themes will supply some default theme specific template overrides - usually for the News module. Theme specific overrides allow for a theme to provide a completely different look and feel to a site.
Theme specific template overrides are located in the directory
Again the template path is dependent on the template being overriden. Using the same example to override the template
for the theme 'andreas08' create the new template in
i.e. the new template is
CategoryDeveloperDocs
modules/Example/pntemplates/example_user_display.htm
config/templates/Example/
config/templates/Example/example_user_display.htm.
themes/<theme name>/templates/modules/<template path>
modules/Example/pntemplates/example_user_display.htm
themes/andreas08/templates/modules/Example/
themes/andreas08/templates/modules/Example/example_user_display.htm .
Template overrides
Template overrides allow for the customization any layout provided by a Zikula module or block. Two types of template overrides exist: global and theme specific.
Global template overrides
Global template overrides allow the customization of a piece of layout for all themes. Global template overrides exist so that pieces of layout can be altered without having to modify the base template supplied by the module to ensure that no changes are lost during upgrades of Zikula and/or the module.
Global template override are located the directory
config/templates/<template path>
The template path will depend on the exact template being overridden. For example to override the template
modules/Example/pntemplates/example_user_display.htm
create a new template in
config/templates/Example/
i.e. the new template is
config/templates/Example/example_user_display.htm.
Theme specifc template overrides
Theme specific template overrides allow for the customization of a piece of layout for one theme only. Most themes will supply some default theme specific template overrides - usually for the News module. Theme specific overrides allow for a theme to provide a completely different look and feel to a site.
Theme specific template overrides are located in the directory
themes/<theme name>/templates/modules/<template path>
Again the template path is dependent on the template being overriden. Using the same example to override the template
modules/Example/pntemplates/example_user_display.htm
for the theme 'andreas08' create the new template in
themes/andreas08/templates/modules/Example/
i.e. the new template is
themes/andreas08/templates/modules/Example/example_user_display.htm
CategoryDeveloperDocs
