No announcement yet.

How do I include my custom template in current template?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I include my custom template in current template?

    I've made a simple template (called mySimpleTemplate) and it's sitting nicely under the Custom Templates area of my current Style.

    I'd like to include its output within a page that is being made up from another template (say, just after the navbar in the SHOWTHREAD template).


    I assume that somewhere I have to assign $mySimpleTemplate to point(?) to my template or call it in some way, but how and where do I do it?

  • #2
    Edit this template:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> PHP Include Code Templates -> phpinclude_start

    Add this code:

    eval('$mySimpleTemplate = "' . fetch_template('mySimpleTemplate') . '";');
    Now you can use that variable in the SHOWTHREAD template.


    • #3
      Excellent, thank you very much for the missing link


      • #4
        I didn't find :
        PHP Include Code Templates -> phpinclude_start

        where could I find it for 3.6 forums ?
        Arabic Village Social forums


        • #5
          Phpinclude has been replaced by the global_start plugin. Please see these instructions for including PHP, TXT or HTML in a template:

          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.


          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.