Skip to content

mxm, IT's mad science

Sections
Personal tools
You are here: Home » Papers » Basic AT Template
Downloads
You can download mxm products here.

Due to it's technical and international nature, this section is in english.

Max M Has a blog too.

og er glad for mad

 

Basic AT Template

I always use this page as a base for new views on Archetype based content, so I might as well put it here for easy retrieval.

code:

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
          xmlns:tal="http://xml.zope.org/namespaces/tal"
          xmlns:metal="http://xml.zope.org/namespaces/metal"
          xmlns:i18n="http://xml.zope.org/namespaces/i18n"
          lang="en"
          metal:use-macro="here/main_template/macros/master"
          i18n:domain="plone">

    <body>

    <div metal:fill-slot="main">

        <h1 class="documentFirstHeading"
                   tal:condition="here/Title | nothing" >
            <metal:field use-macro="python:here.widget('title', mode='view')" />
        </h1>

        <div class="documentDescription"
             tal:condition="here/Description | nothing">
            <metal:field use-macro="python:here.widget('description', mode='view')" />
        </div>

        <metal:field use-macro="python:here.widget('text', mode='view')"
                     tal:condition="here/getText | nothing" />

    </div>

    </body>
    </html>

This snippet for hiding the green border I tend to forget too:

    <metal:block fill-slot="top_slot"
                 tal:define="dummy python:request.set('disable_border',1)" />

Created by maxm
Last modified 2008-06-17 10:46 PM