Jump to content

Template file in an addon?


Recommended Posts

I found the easiest way was to do a php include on within the template file. for example, say you have stuff in "test.php" that you want to display on the affiliate page. You would modify affiliates.tpl and add the following:

 

{php}
include('test.php');
{/php}

 

There might be a better way of doing it, but this is what I've found :)

Link to comment
Share on other sites

I found the easiest way was to do a php include on within the template file. for example, say you have stuff in "test.php" that you want to display on the affiliate page. You would modify affiliates.tpl and add the following:

 

{php}
include('test.php');
{/php}

 

There might be a better way of doing it, but this is what I've found :)

 

Great, thank you. I wasn't sure if having a template file as the main file in my addon would work or not, but if it works for you, I'll give it a try.

Edited by triadwebzone
Link to comment
Share on other sites

If I have no other files in my addon besides a template file, and I put a smarty tag in that file, all I get is a display of the tag, not what the tag represents. For example, if I were to put {php}Some Code Here{/php} in my template file, all that would display on the screen would be {php}Some Code Here{/php} instead of what the code is told to output.

 

See my problem?

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