1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
{$foo}
<div>test</div>
<script type="text/javascript">
console.log({
foo: 'bar',
'foo2': 'bar2',
});
function test() {
console.log("Making sure we don't treat javascript's { 's as smarty tags");
}
</script>
<script type="text/javascript">
// This shows how a smarty tag inside of javascript does sometimes
// break things. I'm not sure how to fix this.
console.log({
foo: 'bar',
{test}
'foo2': 'bar2',
});
</script>
{* test comment *}
{foo} {$baz}
{foo} {bar} {baz}
{foo bar='single quotes' baz="double quotes" test3=$test3}
<ul>
{foreach from=$myvariable item=data}
<li>{$data.field}</li>
{foreachelse}
<li>No Data</li>
{/foreach}
</ul>
<div class="{if $foo}class1{else}class2{/if}">{$foo.bar.baz}</div>
{* test
multi-line
comment
*}
{$bar[42]}
{$bar.$foo}
|