Changes between Version 24 and Version 25 of MarkupTemplates
- Timestamp:
- Jul 25, 2006, 10:07:29 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MarkupTemplates
v24 v25 116 116 {{{ 117 117 #!xml 118 <ul xmlns:py="http://markup.edgewall.org/">118 <ul> 119 119 <li py:content="bar">Hello</li> 120 120 </ul> … … 138 138 {{{ 139 139 #!xml 140 <div xmlns:py="http://markup.edgewall.org/">140 <div> 141 141 <span py:replace="bar">Hello</span> 142 142 </div> … … 160 160 {{{ 161 161 #!xml 162 <ul xmlns:py="http://markup.edgewall.org/">162 <ul> 163 163 <li py:attrs="foo">Bar</li> 164 164 </ul> … … 192 192 {{{ 193 193 #!xml 194 <div xmlns:py="http://markup.edgewall.org/">194 <div> 195 195 <div py:strip="True"><b>foo</b></div> 196 196 </div> … … 214 214 {{{ 215 215 #!xml 216 <div xmlns:py="http://markup.edgewall.org/">216 <div> 217 217 <b py:if="foo">${bar}</b> 218 218 </div> 219 219 }}} 220 220 221 Given the data ` {'foo'=True, 'bar'='Hello'}` in the template context, this would produce:221 Given the data `foo=True` and `bar='Hello'` in the template context, this would produce: 222 222 223 223 {{{ … … 232 232 {{{ 233 233 #!xml 234 <div xmlns:py="http://markup.edgewall.org/">234 <div> 235 235 <py:if test="foo"> 236 236 <b>${bar}</b> … … 248 248 {{{ 249 249 #!xml 250 <div xmlns:py="http://markup.edgewall.org/"py:choose="">250 <div py:choose=""> 251 251 <span py:when="0 == 1">0</span> 252 252 <span py:when="1 == 1">1</span> … … 268 268 {{{ 269 269 #!xml 270 <div xmlns:py="http://markup.edgewall.org/"py:choose="1">270 <div py:choose="1"> 271 271 <span py:when="0">0</span> 272 272 <span py:when="1">1</span> … … 290 290 {{{ 291 291 #!xml 292 <ul xmlns:py="http://markup.edgewall.org/">292 <ul> 293 293 <li py:for="item in items">${item}</li> 294 294 </ul> … … 308 308 {{{ 309 309 #!xml 310 <ul xmlns:py="http://markup.edgewall.org/">310 <ul> 311 311 <py:for each="item in items"> 312 312 <li>${item}</li> … … 321 321 {{{ 322 322 #!xml 323 <div xmlns:py="http://markup.edgewall.org/">323 <div> 324 324 <p py:def="greeting(name)" class="greeting"> 325 325 Hello, ${name}! … … 348 348 {{{ 349 349 #!xml 350 <div xmlns:py="http://markup.edgewall.org/">350 <div> 351 351 <p py:def="greeting" class="greeting"> 352 352 Hello, world! … … 371 371 {{{ 372 372 #!xml 373 <div xmlns:py="http://markup.edgewall.org/">373 <div> 374 374 <py:def function="greeting(name)"> 375 375 <p class="greeting">Hello, ${name}!</p> … … 386 386 {{{ 387 387 #!xml 388 <div xmlns:py="http://markup.edgewall.org/">388 <div> 389 389 <span py:match="greeting"> 390 390 Hello ${select('@name')} … … 411 411 {{{ 412 412 #!xml 413 <div xmlns:py="http://markup.edgewall.org/">413 <div> 414 414 <py:match path="greeting"> 415 415 <span>Hello ${select('@name')}</span>