Docs - setvariable
07/31/2010: SUIT 2.0.1 and Rulebox 1.1.0 released.
Available Since: Rulebox (1.0.0)
Set a variable based on a split string.
Nothing. The variable is modified.
<?php
require 'suit.class.php';
require 'templating.class.php';
$suit = new SUIT();
$templating = new Templating($suit);
$templating->var->dict = array
(
'foo' => 'bar'
);
$templating->setvariable('dict.foo', '.', 'foo', $templating->var);
/*
Result: Nothing. templating->var->dict is now the following:
array
(
'foo' => 'foo'
)
*/
?>
from rulebox import templating
templating.var.dict = {
'foo': 'bar'
}
templating.setvariable('dict.foo', '.', 'foo', templating.var)
# Result: Nothing. templating.var.dict is now the following:
# {
# 'foo': 'foo'
# }





