Quote:
Originally Posted by Steve M
Ok next question, I am reusing the same variable for different pages so I am not having a cluster of different variables within conditional statements. Right now it seems that is confusing me or its the meds, either way is it safe to say I can keep doing that or should I change it?
PHP Code:
$templater->register('display', $display);
That var is what I am reusing for each page load of do=cat or do=file, etc. Do I need to change it to print_output or what?
|
You should be able to use the same variable name on different pages - vb does that alot.
If you are wanting to register that variable on each page for use in the template, you need to put that line inbetween the $templater = vB_Template::create('whatever_template') and the $templater->render() lines.
edit: Or actually, you may be able to just preregister it at the top of you page for the template. See the article I link to in my first post to find out about preregistering variables.