How do I include a template from within another template?
Announcement
Collapse
No announcement yet.
Including a template from within another template
Collapse
X
-
That generally requires modifying the code. What are you trying to do exactly?Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
Change CKEditor Colors to Match Style (for 4.1.4 and above)
Steve Machol Photography
Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.
-
Originally posted by Steve MacholThat generally requires modifying the code. What are you trying to do exactly?
So instead I'd like to add a single include to the standard template and put my extra data in it's own template.
Then my own data is far easier to edit.
It's for a mod I distribute, not just for myself.Last edited by xtf; Fri 17th Feb '06, 3:52am.
Comment
-
That's a bit vague. My guess is that you are going to need to modify the code to do this. Try asking over at www.vbulletin.org.Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
Change CKEditor Colors to Match Style (for 4.1.4 and above)
Steve Machol Photography
Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.
Comment
-
Originally posted by feldon23If you are creating your own Plug-in/Product, there is info at vBulletin.org on how to create your own templates and include them in the package.
At http://vbulletin.org/forum/showthread.php?p=900090 nobody replied yet.
I guess this isn't possible in the current version, but in that case, I'm wondering if you think this would be a good feature to have.
Comment
-
No, because it is a piece of cake to load an extra template. It's 1 line of PHP code through the Plugin system:
Code:eval('$mynewtemplate = "' . fetch_template('mynewtemplate') . '";');
Comment
-
Originally posted by feldon23No, because it is a piece of cake to load an extra template. It's 1 line of PHP code through the Plugin system:
Code:eval('$mynewtemplate = "' . fetch_template('mynewtemplate') . '";');
And aren't the templates preprocessed and cached? The includes could be resolved before they're cached.
Comment
-
Even if uncached, templates will still work. There is however a hook available to cahce your templates.
I suggest you have a look at the Tutorial section of vBulletin.org.Want to take your board beyond the standard vBulletin features?
Visit the official Member to Member support site for vBulletin Modifications: www.vbulletin.org
Comment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment