You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

Pages and Templates

A Structr Page is the root of a tree structure called the Page Tree. A page tree is very similar to the Document Object Model (DOM) of an HTML page in a modern web browser. The following screenshot shows an example of the page tree of the Welcome page (part of the Initial Seed) with the typical HTML nodes like head, hody and div etc.

The Welcome Page

URLs

Every Structr page can be accessed using a unique URL, based on either the name of the page, or its UUID. A page with the name Welcome for example will be available under the following URLs, provided Structr was started with the default configuration.

http://127.0.0.1:8082/847949d00a524a37a9d31a39e7b10a61
http://127.0.0.1:8082/Welcome

HTML Pages

Structr sends the HTTP Content-Type header with a default value of text/html; charset=UTF-8, but this default can easily be changed using the contentType attribute in the Properties Dialog of a page. See Creating non-HTML output for more information about that.

Page Rendering

When a user accesses a page URL with an HTTP client (e.g. a web browser, curl etc.), the rendering engine traverses the page tree and recursively collects the content of all nodes in the tree. This approach allows Structr to determine the Visibility of individual elements and evaluate Repeater Elements very quickly.

Templates

A Template is a special element that can be inserted into the Page Tree. Templates are the only elements that can have content and child nodes simultaneously, which allows the user to create reusable elements. A template node can be a direct child of a page node, making it possible to Create non-HTML output.

Search results for "Pages and Templates"

We could not find anything matching "Pages and Templates" in our documentation. Please rephrase your search.

You can also ask your questions in the Structr Google Group or create a free account in the Structr Support Portal.
Click here to send feedback to the Structr team.