up: ZUT     index Zimbu documentation

CLASS ZUT.Page @public

summary

     

The properties of an HTML page.

NEW(title) @public  Create a page with Title title.
$setBody(body) @public  Set the template to call to fill the body of the page.
$renderBody() ZUT.Html @public  Render the body template, passing context if needed.
$setHtml5(html5) @public  Set whether the page should use an HTML 5 declaration.
$addPath(path) @public  Add a path for which this page should display.
$addCss(css) @public  Add CSS to be inserted in the page header.
 

members (alphabetically)

     

PROC NEW(string title) @public

     

Create a page with Title title.

PROC $addCss(string css) @public

     

Add CSS to be inserted in the page header.

Note that css is included as-is, not processed like a template.

PROC $addPath(string path) @public

     

Add a path for which this page should display.

FUNC $renderBody() ZUT.Html @public

     

Render the body template, passing context if needed.

PROC $setBody(ZUT.HtmlFunc body) @public

     

Set the template to call to fill the body of the page.

Use a callback to pass arguments to the template, e.g.:

 ZUT.page page = NEW("ZUT demo page")
 callback<ZUT.HtmlFunc, string> cb = NEW(ZutDemoPage.page, "Hello world!")
 page.setBody(cb)

PROC $setHtml5(bool html5) @public

     

Set whether the page should use an HTML 5 declaration.

license

      Copyright 2014 Bram Moolenaar All Rights Reserved.

      Licensed under the Apache License, Version 2.0. See the LICENSE file or obtain a copy at: http://www.apache.org/licenses/LICENSE-2.0