![]() |
Using template class
Hello.
I am converting my forum on phpbb to vBulletin. I have portal integrated into my forum. I wanted to use vB template class in my portal, but I cannot find info about how to parse informations into my templates file. Could you tell me, where can I declare variable of template file? Thanks in advance |
Here's an article on registering variables to templates, in case that helps: https://vborg.vbsupport.ru/showthread.php?t=228078
|
So if I want to my use my template, then I put the code of template in Style manager and then
$templater = vB_Template::create('portal'); print_output($templater->render()); where 'portal' is a title of template in style manager? If yes, then I am doing something wrong, because nothing is not generating |
$templater->render() returns a string, so just calling it doesn't produce anything. if your portal template represents and entire html document, then you can call print_output(), like
Code:
$templater = vB_Template::create('portal'); If the portal template isn't an entire document, then you need to save the string in a variable, then use it in another template. |
Thanks for help but my mistake was that, I added template into not default style but second style.
Regards |
I have one more question about template class.
The conditions like <vb:if> are working just on global variables. Is there way to use my own variables without changing class code? |
All times are GMT. The time now is 04:12 PM. |
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:
|