Tutorial 2: 5 page website and also using the filter database.

This tutorial is to show how Kiriwrite works by creating a five page website which uses the layout from the first tutorial but also uses filters from the filter database.

To begin, create a new database (as shown in Tutorial 1) with the following settings:

Setting Value
Database Name Tutorial 2
Database Description The database for Tutorial 2
Database Categories
Database Notes
Database Filename tutorial2

From knowing how to add pages from tutorial 1, add five pages with the following settings as written below:

Setting pets.html family.html computer.html profile.html index.html
Page Name My Pets My Family My Computer Personal Profile Index Page
Page Description A page about my pets. A page about my family. A page about my computer. A page that gives information about me.
Page Section Section Section Section Section Section
Page Template The First Template (firsttemplate.html) The First Template (firsttemplate.html) The First Template (firsttemplate.html) The First Template (firsttemplate.html) The First Template (firsttemplate.html)
Page Filename pets.html family.html computer.html profile.html index.html
Page Content I have three dogs, two cats, four tortoises and one crocodile. I have twenty-six nephews, six sisters, two brothers, a mother and a father. I built my computer seven years ago and at the time was a fairly decent machine which could run most of the stuff available at the time. I am around thirty years old, I like going out for most of the time and I enjoy eating sausage rolls. Welcome to the index page. This page gives a list of all the other pages available.
Page Settings Use page name and section name. Use page name and section name. Use page name and section name. Use page name and section name. Use page name and section name.

After entering all of the five pages into the 'Tutorial 2' database, compile the pages using the method described in Tutorial 1 and go into the Output Directory. You should see all of the pages from the 'Tutorial 2' database compiled.

If you wanted to change a line in one of the pages or where a custom tag was defined and replace that tag with a certain piece of text. This is where the filter database comes into use.

As an example, using the existing 'Tutorial 2' database, the pets.html page had to be changed because there really isn't one crocodile but two hamsters instead and for the family.html page there was twenty nephews and nieces instead of twenty-six nephews.

Click on the 'View Filters' menu link and then click on the 'Add Filter' link and enter the following settings for the new filter:

Setting Value
Find... one crocodile
Replace with... two hamsters
Priority
Notes

After the settings have been entered, click on the 'Add Filter' button which adds the filter to the filter database and then click on the 'Return to the filter list.' link. Repeat this process for the next filter:

Setting Value
Find... twenty-six nephews
Replace with... twenty nephews and nieces
Priority
Notes

Once the filter has been added, compile the pages from the database again and this time check the pets.html and family.html files to see if they have been changed and if it's been done correctly then the pages should have been changed to the new values specified by the filters. Filters should be used sparingly or used for replacing tags as it will replace all text that is matched with the find setting.

Before starting tutorial 3, you may want to delete the two filters that were created in the filters database.