Advanced configuration
Template variables (TVs)
The template variables specified in the page properties line foo, bar=foo
can be used in the template like this:
<?php if(isset($tv['foo'])): ?>Hello Wold!<?php endif; ?>
<?php if(isset($tv['bar']) && $tv['bar']=='foo'): ?>Hello Wold!<?php endif; ?>
<?php if(isset($tv['bar'])): ?><?php echo $tv['bar']; ?><?php endif; ?>
Call of PHP functions from the page content
- Set
content_function
to1
(Administration → Settings → Advnced settings) - You can now specify function calls like this: [function:myFunction(2,3)]
Example function (defined in cms/includes/functions.content.inc.php):
function myFunction($x,$y) { return $x + $y; }