X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=template.php;h=2a21975f13ef42e35f3e10da09b000ef0c877e01;hb=332683184a73f7c141132c20c715cd731687f835;hp=1caaadc81cbb5cce7bf32922465aa6a1f2887692;hpb=cf5d0ee46eaa0239459a54464e5983a3e2645852;p=wfpl.git diff --git a/template.php b/template.php index 1caaadc..2a21975 100644 --- a/template.php +++ b/template.php @@ -57,6 +57,11 @@ class tem { $this->keyval[$key] = $value; } + # like set() but appends + function append($key, $value) { + $this->keyval[$key] .= $value; + } + # clear a value. Functionally equivalent to set($key, '') but cleaner and more efficient function clear($key) { unset($this->keyval[$key]); @@ -218,6 +223,11 @@ function tem_init() { } } +function tem_append($key, $value) { + tem_init(); + $GLOBALS['wfpl_template']->append($key, $value); +} + function tem_set($key, $value) { tem_init(); $GLOBALS['wfpl_template']->set($key, $value);