parent nodes: GlobalAttributesTemplates | Intro3Formatting | PageFormatting | PageFormTemplates | TextBlocks

Page Page Templates

Contents:
Page Page Templates
General
Example
Global templates
Heading generation
Settings
Global attributes

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 "PageContactTemplate", that lookes like this: It also has a childpage "PageContactParent", that contains a list of contacts and has a template attribute attached to it.: If now a new contact "Contact 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

Settings

Global attributes

[global.template: page name]
Sets a default template for every new page in wiki; can be overruled by a local template attribute; default = none.

[global.template_head: auto / manual]
Sets the default title generation for templated pages to auto of manual; default = auto.

Top
previous: Back
parents:  GlobalAttributesTemplates, Intro3Formatting, PageFormatting, PageFormTemplates, TextBlocks
[help.status: done]