OpenWGA 5.4 - WebTML reference

WebTML tags

<tml:createpage>

Description :
Displays a  button to create a new document, if you are in the WGA Content Manager.

By using this tag the designer is able to define certain clickable spots within the website layout which offer authors a shortcut to create new documents of a predefined content type and position. In this way new documents are normally created below the current document in context. If the created document should be a root document instead, you can chose the target area by using the attribute area.The content type can be preset by the attribute contenttype.
Derived from: Attributes:
show inherited attributes ...
Name Value(s) Purpose
area website-area-name Specifies the name of the area in which a new document should be created as root document
contenttype documenttype content type of the created document
message HTML-Code Title of the button

Details:
The advantage of  the <tml:createpage>-Button over the default-creation-functionality of the WGA Content Managers is the user-defined positioning functionality and the presetting of  creation date.

The designer can position the creation-functionality for special content types on a website where the authors would expect them. Usually it is near navigators or collections which display documents of this type. So the designer could offer a button to create new documents e.g. from type "news", below a collection of documents from this type.

This tag checks the permission of the current author before displaying the button. If the author is not allowed to use the button at the chosen content type and the chosen position, the button will not be displayed.
Examples:
In this exampel we display a news collection with a navigator. Directly above is the button to create new news-documents. The necessary informations like position and content type are already preset.

<div id="news">

            <tml:createpage contenttype="news" context="name:news" message="{label('new-pressrelease')}"/>

            <tml:children context="name:news" sortorder="descending" sortexpression="MODIFIED" pagesize="30">
                  <h1><a href="<tml:url/>"><tml:item name="headline"/></a></h1>
                  <p>
                      <tml:item name="body"/>
                  </p>
              </tml:children>
</div>