simplate (0.4.2) | 2010-01-13 01:02 |
<{literal}> タグに囲まれたデータのブロックは、リテラルとして認識されます。これは一般的に、Javascript やスタイルシートなどで中括弧がテンプレートの デリミタ として解釈されるとまずい場合に使用します。ただし、Simplate の場合はデフォルトデリミタが <{ }> なので、通常、<{literal}> タグを使用することはありません。<{literal}><{/literal}> タグの内部は解釈されず、そのままで表示されます。
- <{* included this style .. as an experiment *}>
- <style type="text/css">
- <{literal}>
- /* this is an intersting idea for this section */
- .madIdea{
- border: 3px outset #ffffff;
- margin: 2 3 4 5px;
- background-color: #001122;
- }
- <{/literal}>
- </style>
- <div class="madIdea">With smarty you can embed CSS in the template</div>