1
Can anybody "translate" this code-snippet to Smarty?!
$design_1 = rand(1, 4);
$design_2 = rand(1, 4);
if( $design_1 == 1 ) {
$design_1_width = 24;
} elseif( $design_1 == 2 || $design_1 == 3 ) {
$design_1_width = 14;
} elseif( $design_1 == 4 ) {
$design_1_width = 19;
}
if( $design_2 == 1 ) {
$design_2_width = 24;
} elseif( $design_2 == 2 || $design_2 == 3 ) {
$design_2_width = 14;
} elseif( $design_2 == 4 ) {
$design_2_width = 19;
}
(at least first if chain)... I have smarty random plugin, randomizer isn't a question.
And slightly related question. Why, if theme has smarty's "assign" operator in body, theme's changes are not visible ("update theme..." enabled, sure) and single way to update it is clen-up template_c dir?