1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
\r
4 <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">
\r
5 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
\r
6 <title>Kiriwrite Documentation - Tutorial Documentation - Tutorial 2: 5 page website and also using the filters database</title>
\r
9 <div class="menubarback">
\r
10 <div class="menubar">
\r
11 <span class="apptitle">Kiriwrite</span>
\r
12 <a href="index.html">Index</a> | <a href="user.html">User
\r
13 Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> |
\r
14 <a href="developer.html">Developer Documentation</a>
\r
17 <div class="pageinformation">
\r
18 <span class="pagetitle">Tutorial 2: 5 page website and also using the filter database.</span><br><br>
\r
20 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.<br><br>
\r
22 To begin, create a new database (as shown in Tutorial 1) with the following settings:<br><br>
\r
24 <table class="infotable">
\r
26 <td class="tableheading">Setting</td>
\r
27 <td class="tableheading">Value</td>
\r
30 <td class="tabledata">Database Name</td>
\r
31 <td class="tabledata">Tutorial 2</td>
\r
34 <td class="tabledata">Database Description</td>
\r
35 <td class="tabledata">The database for Tutorial 2</td>
\r
38 <td class="tabledata">Database Categories</td>
\r
39 <td class="tabledata"></td>
\r
42 <td class="tabledata">Database Notes</td>
\r
43 <td class="tabledata"></td>
\r
46 <td class="tabledata">Database Filename</td>
\r
47 <td class="tabledata">tutorial2</td>
\r
53 From knowing how to add pages from tutorial 1, add five pages with the following settings as written below:<br><br>
\r
55 <table class="infotable">
\r
57 <td class="tableheading">Setting</td>
\r
58 <td class="tableheading">pets.html</td>
\r
59 <td class="tableheading">family.html</td>
\r
60 <td class="tableheading">computer.html</td>
\r
61 <td class="tableheading">profile.html</td>
\r
62 <td class="tableheading">index.html</td>
\r
65 <td class="tabledata">Page Name</td>
\r
66 <td class="tabledata">My Pets</td>
\r
67 <td class="tabledata">My Family</td>
\r
68 <td class="tabledata">My Computer</td>
\r
69 <td class="tabledata">Personal Profile</td>
\r
70 <td class="tabledata">Index Page</td>
\r
73 <td class="tabledata">Page Description</td>
\r
74 <td class="tabledata">A page about my pets.</td>
\r
75 <td class="tabledata">A page about my family.</td>
\r
76 <td class="tabledata">A page about my computer.</td>
\r
77 <td class="tabledata">A page that gives information about me.</td>
\r
78 <td class="tabledata"></td>
\r
81 <td class="tabledata">Page Section</td>
\r
82 <td class="tabledata">Section</td>
\r
83 <td class="tabledata">Section</td>
\r
84 <td class="tabledata">Section</td>
\r
85 <td class="tabledata">Section</td>
\r
86 <td class="tabledata">Section</td>
\r
89 <td class="tabledata">Page Template</td>
\r
90 <td class="tabledata">The First Template (firsttemplate.html)</td>
\r
91 <td class="tabledata">The First Template (firsttemplate.html)</td>
\r
92 <td class="tabledata">The First Template (firsttemplate.html)</td>
\r
93 <td class="tabledata">The First Template (firsttemplate.html)</td>
\r
94 <td class="tabledata">The First Template (firsttemplate.html)</td>
\r
97 <td class="tabledata">Page Filename</td>
\r
98 <td class="tabledata">pets.html</td>
\r
99 <td class="tabledata">family.html</td>
\r
100 <td class="tabledata">computer.html</td>
\r
101 <td class="tabledata">profile.html</td>
\r
102 <td class="tabledata">index.html</td>
\r
105 <td class="tabledata">Page Content</td>
\r
106 <td class="tabledata">I have three dogs, two cats, four tortoises and one crocodile.</td>
\r
107 <td class="tabledata">I have twenty-six nephews, six sisters, two brothers, a mother and a father.</td>
\r
108 <td class="tabledata">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.</td>
\r
109 <td class="tabledata">I am around thirty years old, I like going out for most of the time and I enjoy eating sausage rolls.</td>
\r
110 <td class="tabledata">Welcome to the index page. This page gives a list of all the other pages available.</td>
\r
113 <td class="tabledata">Page Settings</td>
\r
114 <td class="tabledata">Use page name and section name.</td>
\r
115 <td class="tabledata">Use page name and section name.</td>
\r
116 <td class="tabledata">Use page name and section name.</td>
\r
117 <td class="tabledata">Use page name and section name.</td>
\r
118 <td class="tabledata">Use page name and section name.</td>
\r
124 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.<br><br>
\r
126 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.<br><br>
\r
128 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.<br><br>
\r
130 Click on the 'View Filters' menu link and then click on the 'Add Filter' link and enter the following settings for the new filter:<br><br>
\r
132 <table class="infotable">
\r
134 <td class="tableheading">Setting</td>
\r
135 <td class="tableheading">Value</td>
\r
138 <td class="tabledata">Find...</td>
\r
139 <td class="tabledata">one crocodile</td>
\r
142 <td class="tabledata">Replace with...</td>
\r
143 <td class="tabledata">two hamsters</td>
\r
146 <td class="tabledata">Priority</td>
\r
147 <td class="tabledata"></td>
\r
150 <td class="tabledata">Notes</td>
\r
151 <td class="tabledata"></td>
\r
157 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:<br><br>
\r
159 <table class="infotable">
\r
161 <td class="tableheading">Setting</td>
\r
162 <td class="tableheading">Value</td>
\r
165 <td class="tabledata">Find...</td>
\r
166 <td class="tabledata">twenty-six nephews</td>
\r
169 <td class="tabledata">Replace with...</td>
\r
170 <td class="tabledata">twenty nephews and nieces</td>
\r
173 <td class="tabledata">Priority</td>
\r
174 <td class="tabledata"></td>
\r
177 <td class="tabledata">Notes</td>
\r
178 <td class="tabledata"></td>
\r
184 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.<br><br>
\r
186 Before starting tutorial 3, you may want to delete the two filters that were created in the filters database.
\r