gs.content.form.base
Templates¶
Layouts¶
There are two standard layouts for pages on GroupServer:
- A full-page layout, and
- A layout with a menu.
Full-Page Layout¶
The full-page layout is the standard layout for GroupServer. To
use the full-page layout with your page first add a
metal:use-macro
call to the <html>
element.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="context/@@groupserver_full_layout/page">
Then fill the slots.
Slots¶
There are nine slots defined by the two layouts.
metal:fill-slot="title"
:- The compulsory title of the page. It is always provided by pages that
use the standard layouts, and always contains a
<title>
element.
<title metal:fill-slot="title">This is the title</title>
metal:fill-slot="metadata"
:- Optional extra metadata for the page. While
<meta>
elements can be added they almost never are. However,<link>
elements are often added (especially in pages that would use a breadcrumb trail, such as within groups). Normally a<metal:block>
element has thefill-slot
attribute, and the metadata to add is placed inside the block. metal:fill-slot="style"
:- Optional extra style (CSS) information for the page. Normally a
<style>
element has thefill-slot
macro. When rendered the style slot appears after the standard GroupServer CSS [1], so the page can overwrite the general style. metal:fill-slot="utilitylinks"
:The optional utility menu. The only time this is ever set is to ensure the is no menu. By default the utility links show either:
- A Login link, or
- A Log Out link and a Profile link.
metal:fill-slot="breadcrumb"
:- The optional breadcrumb trail. It is normally an unordered list, with the first item a link to the site-homepage.
<ul metal:fill-slot="breadcrumb">
<li>
<a href="/" class="icon-alone">
<span aria-hidden="true" data-icon="⌂"></span>
<span class="screen-reader-text">Site home page</span>
</a>
</li>
<li>
<a href="#"><strong>Important</strong></a>
</li>
<li>
A page.
</li>
</ul>
metal:fill-slot="messages"
:- Feedback messages for the form. This is almost only ever filled by the
content-provider supplied by the
gs.content.form
egg [2].
<tal:block
content="structure provider:groupserver.FormStatusMessage"
define="errors view/errors; status view/status; widgets view/widgets"
metal:fill-slot="messages"> </tal:block>
metal:fill-slot="body"
:- The compulsory body of the page.
metal:fill-slot="footer"
:- The optional footer of the page. It appears after the body. By default it
contains the contents of the
Templates/output/footerlinks.xml
instance in the ZMI. metal:fill-slot="javascript"
:- The JavaScript (technically the ECMAScript) for the page. The page-specific scripts appear after the standard JQuery code [3] has been loaded, and the rest of the page has been rendered.
[1] | See the gs.content.css product
<https://github.com/groupserver/gs.content.css/> |
[2] | See the gs.content.form.base product
<https://github.com/groupserver/gs.content.form.base/> |
[3] | See the gs.content.js.jquery.base product
<https://github.com/groupserver/gs.content.js.jquery.base/> |