Skip to main content

Ivan Teoh

Something personal yet public

188-template7.html

(Source)

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <!--! This comment will be dropped from output -->
    <div tal:repeat="item range(10)">
        <p tal:condition="repeat.item.even">Even</p>
        <p tal:condition="repeat.item.odd">Odd</p>
    </div>
    <!--? This comment will be included verbatim -->
    <div>
        <?python import pdb; pdb.set_trace() ?>
        <ul tal:switch="len(items) % 2">
            <li tal:case="True">odd</li>
            <li tal:case="False">even</li>
        </ul>
    </div>
</body>
</html>