# Smarty

*Article Topics:* [*Smarty*](/getting-started/common-topics/smarty.md)

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 NATS, you can enable [linkcodes ](/using-nats/nats-admin-features/linkcodes.md)by changing links from,

```
?<?=(!empty($_REQUEST['nats']) && !preg_match('/[\'\"<>()\\\+\[\]]/', $_REQUEST['nats']))?'&nats='.$_REQUEST['nats']:''?>
```

to,

```
?nats={$nats_code}
```

In NATS, you can use the [nats\_encode](https://tmmwiki.com/index.php/Nats_encode) or [nats\_list\_linkcodes](https://tmmwiki.com/index.php/Nats_list_linkcodes) functions.

## Inline JavaScript & CSS

Place inline JavaScript or CSS between Smarty's *{literal}* and *{/literal}* tags.

## Smart Print Array

To list array values in smarty templates:

{$var|@debug\_print\_var}&#x20;

This will print out the values of Smarty array $var, similar to using print\_r in php.

## See Also

* [Smarty Homepage](http://smarty.net/) - The Smarty homepage and function reference


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.toomuchmedia.com/using-nats/one-off-articles/smarty.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
