![]() |
How to include a template in other template?
How can I include a template in other template?
Like in the template 'vbcms_page', the templates 'header', 'navbar', etc, are including by '{vb:raw xxx}'. I tried to do it like this, but it didn't worked. Any help? Tnx. |
You have to render the initial template and store it in a variable, then register that variable for use in the second template, and add it into the second template as a raw variable.
|
How do I do it...?
I'll be happy if you will explain a little. |
INstantiate the template with vB_Template::create
PHP Code:
PHP Code:
|
I didn't understand. I tried something, but it isn't working.
Where shpuld I put those codes? I understand what should I do from Paul M, but I dont know how to do it. I will be happy id you will explain depper. Tnx for attitude. |
Check this thread : https://vborg.vbsupport.ru/showthread.php?t=228078
|
Got it. but still...:
When im adding the template to a raw variable, and showing it on the template 'vbcms_page', it works. But when im adding this to the 'header' template, id doens't. Here is the plugin: HTML Code:
$abcHTML = vB_Template::create('DK')->render(); I think the HOOK location isn't good. the location is: process_template_complete. but if this is really the problem, why? and i will be happy for a little explain about 'HOOK'. |
All times are GMT. The time now is 04:02 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:
|