This is the website of Andy Carter a Textpattern and Drupal web developer living in the Steel city.
This is a tiny little Textpattern plugin that let's you temporarily override site preferences in templates. This is useful if perhaps you want to slightly alter the global behaviour of articles (for example) in a particular section. The preference is not altered in the database, just in the template (as a result it only works for preferences used during the template rendering).
To install go to the 'plugins' tab under 'admin' and paste the plugin code into the 'Install plugin' box, 'upload' and then 'install'. Finally activate the plugin.
| Attribute | Description | Default | Example |
|---|---|---|---|
| pref | Name of preference in database | unset | pref="publish_expired_articles" |
| value | Override value of the preference | unset | value="0" |
<txp:arc_pref_override pref="publish_expired_articles" value="0" />
<txp:arc_pref_override pref="publish_expired_articles" value="0">
<txp:article limit="5" />
</txp:arc_pref_override>