Last edit 2010-01-19 08:36:55 by HalbrookTech [ ]

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


_EDITED 2009-05-10 02:08:22 by craigh [ ]

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.





_EDITED 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

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.
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 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
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



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