Difference between revisions of "Smarty"
From TMM Wiki
Jump to navigationJump to searchm |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 12: | Line 12: | ||
<pre> | <pre> | ||
− | ?<?=$ | + | ?<?=(!empty($_REQUEST['nats']) && !preg_match('/[\'\"<>()\\\+\[\]]/', $_REQUEST['nats']))?'&nats='.$_REQUEST['nats']:''?> |
</pre> | </pre> | ||
Line 28: | Line 28: | ||
== See Also == | == See Also == | ||
* [http://smarty.net/ Smarty Homepage] -- The Smarty homepage and function reference | * [http://smarty.net/ Smarty Homepage] -- The Smarty homepage and function reference | ||
+ | * [[Smarty print array]] list array values in smarty templates | ||
[[Category:Also NATS4 Article]] | [[Category:Also NATS4 Article]] | ||
+ | [[Category:NATS4 Skins and Templates]] |
Latest revision as of 17:24, 23 May 2017
NATS 3
|
---|
Smarty is a templating engine used by several Too Much Media products.
PHP Parsing
The Smarty templates in NATS are not parsed by PHP for security reasons. In NATS3, you can enable linkcodes by changing links from,
?<?=(!empty($_REQUEST['nats']) && !preg_match('/[\'\"<>()\\\+\[\]]/', $_REQUEST['nats']))?'&nats='.$_REQUEST['nats']:''?>
to,
?nats={$nats_code}
In NATS4, you can use the nats_encode or nats_list_linkcodes functions.
Inline JavaScript & CSS
Place inline JavaScript or CSS between Smarty's {literal} and {/literal} tags.
See Also
- Smarty Homepage -- The Smarty homepage and function reference
- Smarty print array list array values in smarty templates