File: smarty

package info (click to toggle)
ruby-rouge 4.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,836 kB
  • sloc: ruby: 38,168; sed: 2,071; perl: 152; makefile: 8
file content (48 lines) | stat: -rw-r--r-- 829 bytes parent folder | download | duplicates (3)
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}