Deprecating a setting or a template
This page is for designers following their deprecation policy.
A setting
Example: mytheme.ini [Front] Teasers becomes [FrontPage] TeaserCount.
Add the new setting with its default to the theme's settings file.
Read the new one first, then the old one, in templates:
def $count = ezini( 'FrontPage', 'TeaserCount', 'mytheme.ini' ) if ezini_hasvariable( 'Front', 'Teasers', 'mytheme.ini' ) set $count = ezini( 'Front', 'Teasers', 'mytheme.ini' ) /if(Order the reads so a user's override of the old name still wins until they switch.)
Changelog:
Renamed: mytheme.ini [Front] Teasers to [FrontPage] TeaserCount; the old name is read until 2.0.0.In the announced release, remove the old read:
Removed: mytheme.ini [Front] Teasers (use [FrontPage] TeaserCount).
A template
Example: parts/teaser.tpl is replaced by parts/card.tpl.
Create
parts/card.tpl.Make
parts/teaser.tpla one-line include of the new one, with a comment:{* Deprecated since 1.4.0, removed in 2.0.0: include design:parts/card.tpl instead. *} {include uri='design:parts/card.tpl' node=$node}Changelog:
Added: parts/card.tplandUpdated: parts/teaser.tpl is deprecated, use parts/card.tpl.Remove
parts/teaser.tplin the announced release, with the upgrade step for users who override it.
Related pages
- Giving a theme its own settings file
- The ezini operator
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.