Jump to content

smarty syntax


Roger

Recommended Posts

I trying to do something that I think should be reasonably simple. Trying to display a tpl file from within another tpl file.

 

according to the Smarty site this should do the trick:

 

{include file='file:templates/template_name/file.tpl'}

 

But nothing displays. I have resorted to using a test file whose contents are "Hello World!" only. Still nothing. Is there some mystery surrounding the Smarty {include} thingie that I don't know about??

 

Thanks

-Roger

Edited by Roger
Link to comment
Share on other sites

Hey Sparky... :)

 

actually I had

 {include file="templates/$template/file.tpl"} 

and was using it from a header.tpl file. As I messed with this I actually saw the path printed to the screen with the variable expanded to the correct template directory name. It's probably something simple I've over looked. It's not overly important but was very annoying that I couldn't get it right.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated