DotKernel PSR-7 Middleware Applications

Setting variables

This post refers to DotKernel 1, based on Zend Framework 1.
If you are looking for DotKernel 3 related posts, go here.

This is the most easy part: Just use setVar() with the variable name and its new value. An optional third boolean parameter tells if the value should be appended to the existing value (defaults to false).

Setting a variable

setVar('AUTHOR_NAME', 'Author 1');

Variables set influence all variables in the template, no matter if they are defined within a block or not.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>