Location: PHPKode > scripts > PHPTAL > phptal/PHPTAL-1.2.1/tests/input/old-13.html
<html>
    Tests for 'default' keyword

    <span tal:omit-tag="" tal:on-error="string:error catched for define test">
    <span tal:define="global a some/path | default">default a value</span>
    <span tal:replace="a"/>
    </span>

    <span tal:omit-tag="" tal:on-error="string:error catched for define test">
    <span tal:define="global a a2 | default">default a value</span>
    <span tal:replace="a"/>
    </span>

    <span tal:omit-tag="" tal:on-error="string:error caught for content test">
    <span tal:content="some/path | default">default content value</span>
    </span>

    <span tal:omit-tag="" tal:on-error="string:error caught for content test">
    <span tal:content="a | default">default content value</span>
    </span>

    <span tal:omit-tag="" tal:on-error="string:error caught for replace test">
    <span tal:replace="some/path | default">default replacement value</span>
    </span>
    <span tal:omit-tag="" tal:on-error="string:error caught for replace test">
    <span tal:replace="a2 | default">default replacement value</span>
    </span>

    <span tal:omit-tag="" tal:on-error="string:error caught for attributes test">
    <a href="http://www.default.com" title="default title"
       tal:attributes="href link/href | default; title link/title | default"
       tal:content="link/name | default">default content</a>
    </span>

    <span tal:omit-tag="" tal:on-error="string:error caught for attributes test">
    <a href="http://www.default.com" title="default title"
       tal:attributes="href link2/href | default; title link2/title | default"
       tal:content="link2/name | default">default content</a>
    </span>
</html>
Return current item: PHPTAL