Announcement

Collapse
No announcement yet.

How do I include my custom template in current template?

Collapse
X
 
  • 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).

    .
    .
    .
    $header
    $navbar
    $mySimpleTemplate
    .
    .
    .

    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:

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

    Comment


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

      Comment


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

        where could I find it for 3.6 forums ?
        http://www.al-jarodiah.com/vb/
        Arabic Village Social forums

        Comment


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

          http://www.vbulletin.com/docs/html/t..._externalfiles
          http://www.vbulletin.com/forum/showt...18#post1066718
          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

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