Placeholders

Placeholders used to substitute html block after page/component inheritance. Mark html block with <haq:placeholder> tag and use <haq:content> to override it (ID must be same for both tags).

src/pages/layout/template.html file:

<html>
    <body>
        <div class="header"> ... </div>
        <div class="content">
            <haq:placeholder id="myContent">
                Default html block. This is layout page.
            </haq:placeholder>
        </div>
        <div class="footer"> ... </div>
    </body>
</html>

src/pages/index/template.html file:

<haq:content id="myContent">
    Overrided html block. This is index page.
</haq:content>

Example above assume index page extends layout page, so you have in src/pages/index/config.xml file:

<config>
    <extends component="pages.layout" />
</config>

version #205, modified 2013-02-01 02:03:04 by yar3333