![]() |
Any Smarty Programmers Around?
got a question guys if you got the time. Trying to include a html file into a NATS (smarty) template. I tried the usual
{include} {/include} still doesnt seem to work. any ideas? |
try {literal}{/literal} around the regular include.
- thurbs |
http://www.smarty.net/manual/en/lang...on.include.php
{include file='page_footer.tpl'} Did you try it like that above? Jim |
Quote:
|
Smarty in NATS has including disabled. {include file='page_footer.tpl'} will not work.
You need to use a smarty plugin. Hit up TheDoc, i wrote one for him some time ago. |
Quote:
Here's what someone would need to do if they wanted the custom plugin function: Goto your nats/smarty-2.6.18/libs/plugins (or whatever version of smarty you have) and create a file called: function.fileinc.php then enter this into the file: <?php function smarty_function_fileinc($params) { include($params['file']); } ?> After that file is created and the code inserted, you can use this smarty tag on any of the NATS Templates: {fileinc file="path/to/file"} Hope this helps everyone, and people in the future :) Jim |
nailed it,
thanks for the guidance on writing the plugin jim! |
All times are GMT -7. The time now is 05:03 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123