Quote:
Originally Posted by Seductor
If so, I understood that I only would need to call preRegister(), would it be enough?
For example,
Code:
$my_attr = array(
'apple' => 'red',
'banana' => 'yellow'
);
vB_Template::preRegister('FORUMHOME' => $my_attr)
And then could I access it from FORUMHOME using {vb:raw my_attr}?
|
Almost. First, the preRegister line should be like this:
Code:
vB_Template::preRegister('FORUMHOME', $my_attr)
(it has a comma instead of =>). Then in your template you'd use {vb:raw red} and {vb:raw yellow}. It *is* possible to register an array then use loop tags in the template, but I'm going to assume that's not what you're trying to do, unless you say differently.
Is that the example you wanted? If you're not rendering your own template then you don't need to (and in fact you can't) use register().