Literal

{literal} — tags allow a block of data to be taken literally. This is typically used around Javascript or stylesheet blocks where {curly braces} would interfere with the template delimiter syntax. Anything within {literal}{/literal} tags is not interpreted, but displayed as-is. If you need template tags embedded in a {literal} block, consider using {ldelim}{rdelim} to escape the individual delimiters instead.

The {literal}{/literal} tags are generally not required, as Tplix automatically ignores delimiters that are surrounded by whitespace. Additionally, Tplix treats JavaScript and CSS blocks as raw content, preventing them from being parsed or modified.
Examples:

{$var=3}
{literal}
 {$var} {* Comments and the strip plugin are an exception to the literal rule as they still behave as expected even within a literal block *}
{/literal}
{$var}

The above example will output:


{$var} 
3
Was this article helpful?