Login
Donate to Zikula
Wiki : TemplateOverridng
Documentation Home :: Categories :: Page Index :: recent changes :: Search :: Help :: Log in
last edit 2008-06-19 06:27:47 by Operator Minor edits (spelling & grammar corrections, formatting, etc.), plus many revisions of and additions

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.
edited 2008-06-19 05:58:16 by Operator Minor edits (spelling & grammar corrections, formatting, etc.), plus many revisions of and additions

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.
edited 2008-06-19 05:56:20 by Operator Minor edits (spelling & grammar corrections, formatting, etc.), plus many revisions of and additions

Additions:
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:
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:
To do so, create your own custom template called example_user_display.htm in:
Therefore, the full path to and name of your custom template will be:
That's it. There's nothing else you need to do. Zikula will find your templates automatically.
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:
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:
In this case, you need to create a your own template called example_user_display.htm in the directory:
Therefore, the name of and full path to the new template will be:
That's it. Zikula will find your custom template automatically.
Deletions:
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 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
edited 2006-06-21 18:49:37 by markwest fixed wiki words

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
edited 2006-06-02 09:32:10 by markwest improved formatting

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
edited 2006-04-27 14:48:04 by markwest

Deletions:
CategoryDocumentation
edited 2006-04-27 14:47:41 by markwest

Additions:
themes/andreas08?/templates/modules/Example/example_user_display.htm
CategoryDocumentation
CategoryDeveloperDocs
Deletions:
themes/andreas08?/templates/modules/Example/example_user_display.htm
Oldest known version of this page was edited on 2006-04-27 14:46:15 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
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.
edited 2008-06-19 05:58:16 by Operator Minor edits (spelling & grammar corrections, formatting, etc.), plus many revisions of and additions
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.
edited 2008-06-19 05:56:20 by Operator Minor edits (spelling & grammar corrections, formatting, etc.), plus many revisions of and additions
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
edited 2006-06-21 18:49:37 by markwest fixed wiki words
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
edited 2006-06-02 09:32:10 by markwest improved formatting
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
- templates/<template path>
- Example/pntemplates/example_user_display.htm
- templates/Example/
- templates/Example/example_user_display.htm.
- <theme name>/templates/modules/<template path>
- Example/pntemplates/example_user_display.htm
- andreas08?/templates/modules/Example/
- andreas08?/templates/modules/Example/example_user_display.htm
- templates/<template path>
edited 2006-04-27 14:48:04 by markwest
Deletions:
CategoryDocumentation
edited 2006-04-27 14:47:41 by markwest
Additions:
themes/andreas08?/templates/modules/Example/example_user_display.htm
CategoryDocumentation
CategoryDeveloperDocs
Deletions:
themes/andreas08?/templates/modules/Example/example_user_display.htm
Oldest known version of this page was edited on 2006-04-27 14:46:15 by markwest [ ]
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
- templates/<template path>
The template path will depend on the exact template being overridden. For example to override the template
- Example/pntemplates/example_user_display.htm
create a new template in
- templates/Example/
i.e. the new template is
- 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
- <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
- Example/pntemplates/example_user_display.htm
for the theme 'andreas08?' create the new template in
- andreas08?/templates/modules/Example/
i.e. the new template is
- andreas08?/templates/modules/Example/example_user_display.htm

latest author:
Owner: