Announcement

Collapse
No announcement yet.

How can I add a template link into another one?

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

  • How can I add a template link into another one?

    I made a template:
    advertising

    I want this template to be a part of header template

    I pust this:
    $advertising

    It doesnt work, did i miss something?

    Thanks in advance

  • #2
    Add this code to the phpinclude_start template:

    Code:
    eval('$variable = "' . fetch_template('[color=red]template_name[/color]') . '";');
    Change the red code appropriately. Then you can use $variable in the templates and it will parse to the contents of the template you specify.

    Comment


    • #3
      This may sound really dumb but what is better (speed wise)

      the full html in the template (like this person needs- sans template)
      or making a template and putting the ad there?

      Sometimes I see banners loading late... could that be due to templated ads?
      Thanks!

      Comment


      • #4
        They should be functionally identical, but calling a template like this will add an extra query to all forum pages. The effect on performance shouldn't be anything to worry about.

        Comment


        • #5
          Thank you.

          Comment

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