parent nodes: DemoPageFormatting | DemoPageFormTemplates

Demo Page Page Templates

Contents:
Demo Page Page Templates
General
Example
Global templates
Heading generation
Remarks
Todo's
Results

Back

General

Often a series of pages has to be made, that have the same starting content. Contact pages are a good example; they always have (roughly) the same items: name, street, city, zip, country, etc. on them in the same layout and following order. To prevent from having to type all these items again and again for every new contact page that is created, Wikidpad supports templates. Using templates one can predefine the initial content for the child pages of a parent page.

A template is just any other Wikidpad page and it's content can be just about anything, including links, attributes, etc. It can be defined as a template, by specifying it as such on the parent page, using the [template: pagename] attribute. An example tells more, then a thousand words; so see the example below.

Remarks Top

Example

This page has a childpage "DemoPageContactTemplate", that lookes like this: It also has a childpage "DemoPageContactParent", that contains a list of contacts and has a template attribute attached to it.: If now a new contact "DemoContact JasonHorman" is added to the list and it's link is followed to it's new page, that page will look like this: The page can now be finalised, by simply typing Jason Horman's specifics into it.

Remarks Top

Global templates

Next to a page (parent) specific template, also a template for the whole wiki can be defined, using the [global.template: pagename] attribute. This wiki uses the BaseTemplate as a global template. Remarks Top

Heading generation

Wikidpad by default generates a new title for a child based on a template; the same way it does for non-template pages. If not set differently in options (see Page formatting: Page titles), it will take the linkname for the page and generate a title from that.

This behavior can be prevented, by adding the [template_head: manual] attribute to a template. Wikidpad will then refrain from generating a title for any page that is generated based on that template.
This attribute has a global variant [global.template_head: manual] with which title generation for template-children can be switched off for the entire wiki. The [template_head: auto] can then be used, to switch it back on for individual templates.

Top

Remarks

Top

Todo's

done.demo.projectdemo.demo2: check out all posibilities
action.demo.pageformatting.pagetemplates: template action

Top

Results

[demo.status: done]
Top
previous: Back
parents:  DemoPageFormatting, DemoPageFormTemplates