![]() |
Calling other templates
Is there a way to call other templates?
Basically, is there a way to do this: Code:
<vb:if condition="$bbuserinfo[fieldx] != 'Vertical'"> |
No, you have to do that in your code.
|
In the GENERIC_SHELL template, they call certain templates
Code:
{vb:raw headinclude} |
It works if you have already rendered the template and then you need to register the variables for use in that template (it is actually calling a variable with the same name as a template, not calling a template).
|
My thought is to copy the postbit to a new template called postbit2, then put the above code in the postbit.
How can I render the two templates (postbit_legacy and postbit2), or choose which template to use then render one of them? |
You need to fetch the remplate and register it in your code.
|
Stop!!!!
Just check, how vB is handling the postbit templatess;) It's much easier to change $vbulletin->options['legacypostbit'] ! |
^^ What he said. That is the option that determines which postbit template gets used. So, toggle it depending on what the user has selected.
|
Quote:
Where would I find this and how can I access the user's preferences to switch the option? -David |
Did you use a User Profile Field for them to pick which to use? Just do a condition based on that field to change it for the user. Look in the showthread.php file to find a good hook. Or, if in debug mode, you can see the hook locations all listed on the bottom of the page in the order they are used. Sometimes I find myself just going down the list to see which is best.
|
All times are GMT. The time now is 02:42 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|