Log in

View Full Version : Including vB templates internal and external


Otikeu
07-26-2005, 05:00 AM
Well, I need some help, to save space on this thread, you can find my issue at the official site. Though I would ask here also to see if anyone here knows.

http://www.vbulletin.com/forum/showthread.php?t=148173

Thank you in advance for your help, as it is very much appreciated.

Adrian Schneider
07-26-2005, 05:06 AM
Read this tutorial:
https://vborg.vbsupport.ru/showthread.php?t=62164

Also, to have one template include another:
eval('$variable= "' . fetch_template('template_name') . '";');

Otikeu
07-26-2005, 05:25 AM
well, actually I was tring that fetch code, and it does fetch the template, but the stuff under that php code doesn't show. I use that php command between <td>'s in my index.php. Variables and templates show, just not the code contents after the php code of index.php. I used this to get it:


<?php
eval('print_output("' . fetch_template('usernav') . '");');
?>


Also, how do I include vB template coding within a vB template?

Adrian Schneider
07-26-2005, 06:21 AM
Instead of echo or whatever you use customly, use variables, then stick them in the template where you want them.

... assuming I understand your problem correctly.

Otikeu
07-26-2005, 06:47 PM
aye, I'll try that

omg, it works using variables! Basically, I put this code:


eval('$usernav= "' . fetch_template('usernav') . '";');


in my data.php which defines my other variables and used <?=$usernav?> where I wanted the template to be in the coding of my website and success!

I would personally like to thank you for your help. I think this will work in the php_include template of vB so I can use it within vB templates as well. But, seriously, if I had money, I would pay you I'm so happy! :)

Adrian Schneider
07-27-2005, 02:23 AM
lol

Glad to be of assistance. :)