Access Keys:
Skip navigation (Access Key - 0)
AutoPagePlugin


Description

With the AutoPagePlugin you can automatically create new pages that are optionally based on a template. The plugin takes care of naming the pages, inserting the template into the page and storing the created page in the right place.

Let's look at an example. Suppose you want to information about your products in the wiki so that every product gets it's own page.

First of all you will have to create a product template, where you can enter all your product information like description, product title and so on.

Without the AutoPagePlugin you would have to do the following steps over and over again for each new product you want to enter:

  1. locate the parent page
  2. create a new page for the product
  3. give the page a name
  4. fill out the template
  5. save the page

What the AutoPagePlugin does for you is to automate steps 1, 2, 3 and 5. Basically all you have to care about is to enter the information into the template and to hit the save button.

Now let's have a look at the macro:

{auto-page:template=product-template|prefix=Product-|digits=3|labels=products}Create new product{auto-page}

There are various parameters.

template

The template specifies the name of the template that will be used for created pages. If your product template is called ProductTemplate, use template=ProductTemplate.

prefix

The prefix describes the prefix of the page title. In our example the prefix is Product-. So when we enter a new product into the system, the titles of new product-pages always start with Product-.

digits

The number of digits to use in the title. This is the second part of the title. We have prefix set to Product- and digits set to 3. So the first product gets the title Product-001, the second Product-002 and so on.

If we had used 5 digits, then the first title would have been Product-00001, the second Product-00002, and so on.

labels

Here you can add labels for the created pages. In our case, a products label is attached to the new product pages.

Now let's try it out. I am using the code from above, except that I won't be using templates here, so all created pages will have a blank content. 

No permission to create page

When you click on the link an Edit Page dialogue will come up and you can enter product information.

(None)

Adaptavist Theme Builder (3.0.1-SNAPSHOT) Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 916 Build:#Nov 09, 2007 {3})
Free theme builder license