- Start a New Page
- [[include include:languages pagename=start-a-new-page]]
There are three ways to start a new page.
1. Use the Add a New Page Box
In every default theme, there is a box labeled Add a new page in the left sidebar. Type in the name of the page you want to create and click the button marked new page. You will be taken to the page editor. Type in something and then click save at the bottom of the page editor.
2. Click on a Link
Click on a link leading to an uncreated page - like this one. You will be taken to the uncreated page. Click on the link that says create this page and you will be taken to the page editor. Type in something and then click save at the bottom of the page editor.
3. Edit the Url (Advanced Skill)
In the url box of your browser, edit the url so that it leads to an uncreated page. Then proceed as usual.
Some Notes
The name of the page that you type into the Add a new page box is the url of the page, not necessarily the title. The url and the page title are independent. For more information see : Page title.
TODO: add something on the choose template dialog which appears directly at the creation of the new page
Tags: beginner new-page novice page template todo-en
(Original Page= http://www.wikidot.com/doc:templates)
Templates( live)
Summary
- template is a special page that defines common items to display on pages in a category
- templates are easy way to change the layout for pages in a category
- the name of the special page defining the layout for a category is category:_template (examples below)
Details
To create a template for a category you create a page called "_template" in that category. For the default category, the template page is called "_template". For example:
_template
category:_template
bugs:_template
proposals:_template
Pages that start with an underscore are not listed by other modules and hidden in most cases.
Defining layout
The purpose of a template is to define a layout of pages within a category. Here is a simple template that forces the height of the content box. Create a page called _template with this code, and then reload the start page of your site:
[[div style="min-height:600px"]]
%%content%%
[[/div]]
Here is a more typical template, which adds a comments module below the page content:
+ Original content of the page below
%%content%%
----------------
[[module Comments]]
It is easy to image what it really does. When this markup is saved as some-category:_template, all pages from the some-category will be combined with the template during rendering. Content of the page will be substituted into the %%content%% tag. This way we can add headers, side bars, navigation elements, modules and comment boxes to the template and the viewed page will automatically have it.
When you try editing a page from the category, only the "inside content" is editable. Template is applied only when viewing the compiled page.
Splitting the content
Let us start with an example of a template:
[[code]]
%%content{1}%%
%%content{2}%%
%%content{3}%% | %%content{4}%% |