Blame view

mobile/source/ext/phptal/tests/input/old-03.html 942 Bytes
a1684257   Administrator   first commit
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
  <span tal:omit-tag="" tal:comment="this tag head and foot are removed from result">
  
  <span tal:comment="set some data"
        tal:define="global a string:a;
                    global b string:b;
                    global c string:c;"/>
  <span tal:define="global a">prout</span>
  
  <span tal:content="a"/>
  <span tal:content="b"/>
  <span tal:content="c"/>
  
  
  <!-- test attributes -->
  <a href="http://www.google.fr"
     tal:attributes="href a; title a;"
     tal:content="c"
  >should be c</a>
  
  <a href="http://www.example.fr"
     tal:attributes="href string:http://www.pearfr.com">foo</a>
  
  <!-- test if -->
  <div tal:condition="php: c EQ 'c'">c == c</div>
  
  This should be equal to 'prout' : <div tal:replace="a"/>
  
  <div tal:on-error="string:error produced here correctly handled"><span tal:replace="unkown_path"/></div>
  
  <div tal:repeat="item php:array('a','b','c','d')">
      <span tal:replace="repeat/item/index"/>: <span tal:content="item"/>
  </div>
  </span>