White_Snake
02-24-2010, 06:08 PM
on cellarius article on vbulletin templating, he explains the way to send variables to preexisiting templates is this:
$templater = vB_Template::create('mytemplate');
$templater->register('my_var', $my_var);
$templater->register('my_array', $my_array);
$templatevalues['my_insertvar'] = $templater->render();
vB_Template::preRegister('FORUMHOME', $templatevalues);
but what when you need to only send a single variable to a existing template without the need to create a new template such as is requested on the first line?
i want to send a variable to the template editpost but this method doesnt seem to work, anybody can help me? thanks
$templater = vB_Template::create('mytemplate');
$templater->register('my_var', $my_var);
$templater->register('my_array', $my_array);
$templatevalues['my_insertvar'] = $templater->render();
vB_Template::preRegister('FORUMHOME', $templatevalues);
but what when you need to only send a single variable to a existing template without the need to create a new template such as is requested on the first line?
i want to send a variable to the template editpost but this method doesnt seem to work, anybody can help me? thanks