Include PHP footer/header in Smarty Templates

Discussion in 'PHP' started by YugKoobe, Aug 7, 2006.

  1. #1
    Anyone have luck including simple PHP header/footer files in a Smarty template?

    I've tried a few includes variations but it doesn't seem to like them very much. :confused:

    Thanks!
     
    YugKoobe, Aug 7, 2006 IP
  2. esiason14

    esiason14 Peon

    Messages:
    272
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    did you try something like this:

    {php}include("whatever.php");{/php}
     
    esiason14, Aug 7, 2006 IP
    YugKoobe likes this.
  3. YugKoobe

    YugKoobe Well-Known Member

    Messages:
    301
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    108
    #3
    exactly what I was looking for, thanks esiason14!
     
    YugKoobe, Aug 7, 2006 IP
  4. coderlinks

    coderlinks Peon

    Messages:
    282
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #4
    To include another Smarty template itself, you can use:

    {include file="hooba.tpl"}

    Just thought you would want to know. :D
    Thomas
     
    coderlinks, Aug 8, 2006 IP
    YugKoobe likes this.