templates/layout.tmpl
author Tero Marttila <terom@fixme.fi>
Sat, 07 Feb 2009 03:01:46 +0200
changeset 19 9c9643047a10
parent 12 2abc5ace0b15
child 20 d40c339d3778
permissions -rw-r--r--
remove old templates
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<%def name="render_menu(open_page, page, items, ancestry)">
<ul>
% for pi in items :
    <li>
        <a href="${site_page_url}/${pi.url}"${' class="selected-page"' if pi == open_page else ''}>${pi.title} ${'&raquo;' if pi.children and pi.parent else ''}</a>
    % if pi in ancestry and pi.children and pi.parent :
        ${render_menu(page, pi, pi.children, ancestry)}
    % endif
    </li>
% endfor
</ul>
</%def>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <title>qmsk.net :: ${page.title}</title>
        <link rel="Stylesheet" type="text/css" href="${site_root_url}/static/style.css" />
    </head>
    <body>
            <div id="header">
                <a href="${site_page_url}/">QMSK.NET</a>
            </div>
            
            <div id="nav">
                ${render_menu(menu.page, menu.page, menu.items, menu.ancestry)}
            </div>

            <div id="content">
                ${page.content}
            </div>
    </body>
</html>