Announcement

Collapse
No announcement yet.

Including a template from within another template

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • feldon23
    replied
    If you find a place where there is no hook, then please either post in the "Hooks Request" thread or use global_start.

    Leave a comment:


  • Marco van Herwaarden
    replied
    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.

    Leave a comment:


  • xtf
    replied
    Originally posted by feldon23
    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') . '";');
    and it's much more efficient because you call it when you need it instead of on every page.
    If there is a hook at the right place. What if there is no hook?
    And aren't the templates preprocessed and cached? The includes could be resolved before they're cached.

    Leave a comment:


  • feldon23
    replied
    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') . '";');
    and it's much more efficient because you call it when you need it instead of on every page.

    Leave a comment:


  • xtf
    replied
    Originally posted by feldon23
    This is not possible.
    So do you think this would be a good feature to have (in a next version)?

    Leave a comment:


  • feldon23
    replied
    This is not possible.

    Leave a comment:


  • xtf
    replied
    Originally posted by feldon23
    If 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.
    I know, but I would like to include a template from within another template without additional code.

    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.

    Leave a comment:


  • Steve Machol
    replied
    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.

    Leave a comment:


  • feldon23
    replied
    If 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.

    Leave a comment:


  • xtf
    replied
    Originally posted by Steve Machol
    That generally requires modifying the code. What are you trying to do exactly?
    I've added extra data to some standard templates, but that's not easy to update.
    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.

    Leave a comment:


  • Steve Machol
    replied
    That generally requires modifying the code. What are you trying to do exactly?

    Leave a comment:


  • xtf
    started a topic Including a template from within another template

    Including a template from within another template

    Hi,

    How do I include a template from within another template?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X