diff options
Diffstat (limited to 'TWiki')
-rw-r--r-- | TWiki/TWikiCategoryTable.mdwn | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/TWiki/TWikiCategoryTable.mdwn b/TWiki/TWikiCategoryTable.mdwn index e8f3115d..7a048c65 100644 --- a/TWiki/TWikiCategoryTable.mdwn +++ b/TWiki/TWikiCategoryTable.mdwn @@ -1,4 +1,6 @@ -**_What is a Category Table?_** +## <a name="TWiki_Category_Table"> TWiki Category Table </a> + +### <a name="What_is_a_Category_Table_"> What is a Category Table? </a> It is possible to add a Category Table to a %WIKITOOLNAME% web. It allows you to categorize and classify a topic, e.g. give some structure to the content of a web. @@ -63,15 +65,26 @@ One sample application is a knowledge base for customer support. The web for cus **_Hint:_** The topic classification can be used to do some automatic processing in the background. For example, a script could automatically publish the FAQ entries to your corporate web site, including FAQ index page and file attachments. -**_How to Define a Category Table_** +### <a name="How_to_Define_a_Category_Table"> How to Define a Category Table </a> -The Category Table is defined by some template files. To add a Category Table to your %WIKITOOLNAME% web you need to place the following three files into the `twiki/templates/{Yourweb}` directory: +The Category Table is defined by some template files. To add a Category Table to your %WIKITOOLNAME% web you need to place the following three files into the <code>**twiki/templates/\{Yourweb\}**</code> directory: -* `twikicatitems.tmpl` : Defines the items in the table -* `twikicatedit.tmpl` : Defines the look of the table when editing a topic -* `twikicatview.tmpl` : Defines the look of the table when viewing a topic +<table border="1" cellpadding="1" cellspacing="0"> + <tr> + <td><code><b>twikicatitems.tmpl</b></code> : </td> + <td> Defines the items in the table </td> + </tr> + <tr> + <td><code><b>twikicatedit.tmpl</b></code> : </td> + <td> Defines the look of the table when editing a topic </td> + </tr> + <tr> + <td><code><b>twikicatview.tmpl</b></code> : </td> + <td> Defines the look of the table when viewing a topic </td> + </tr> +</table> -**_Format of Category Definition Template File twikicatitems.tmpl_** +#### <a name="Format_of_Category_Definition_Te"> Format of Category Definition Template File twikicatitems.tmpl </a> Valid lines: @@ -99,11 +112,11 @@ Example file: checkbox|OperatingSystem|true|5|OsSolaris|OsSunOS|OsHPUX|OsWin text|OsVersion|16 -**_Format of twikicatedit.tmpl and twikicatview.tmpl_** +#### <a name="Format_of_twikicatedit_tmpl_and_"> Format of twikicatedit.tmpl and twikicatview.tmpl </a> -Use the example below and customize if needed. `twikicatedit.tmpl` and `twikicatview.tmpl` can be identical, but they do not have to be. +Use the example below and customize if needed. <code>**twikicatedit.tmpl**</code> and <code>**twikicatview.tmpl**</code> can be identical, but they do not have to be. -**_Attention:_** `<!--TWikiCat-->` is needed at the beginning and end as markers. Do not delete them! +**_Attention:_** <code>**<!--TWikiCat-->**</code> is needed at the beginning and end as markers. Do not delete them! Example: @@ -180,10 +193,20 @@ Above template files will result in the following table when **_editing_** a top </tr> </table></nop></form> -**_Note:_** It is possible to force the values of a Category Table when creating a new topic. This is useful to create new topics using a form for the topic name. The default values of the Category Table can be specified as hidden fields if needed, i.e. `<input type="hidden" name="someCategory" value="someValue">` +### <a name="Default_Values_for_a_Category_Ta"> Default Values for a Category Table </a> + +It is possible to force the values of a Category Table when creating a new topic. You can define a default template to set the Category Table and/or specify individual values. + +#### <a name="Default_Topic_Template"> Default Topic Template </a> + +Whenever you create a new topic, the <code>**twiki/templates/Webname/notedited.tmpl**</code> file is used as the new topic template. To create this template, save a topic with the default text and the Category Table setting you need, then copy the content of the topic to the <code>**notedited.tmpl**</code> template (including the Category Table). Look also at the <code>**twiki/templates/Know/notedited.tmpl**</code> included in the distribution. + +#### <a name="Set_Individual_Category_Table_Va"> Set Individual Category Table Values </a> + +It is possible to set individual values of a Category Table when creating a new topic. This is useful when you have a form to create a new topic of a certain classification. The default values of the Category Table can be specified as hidden fields as needed, i.e. `<input type="hidden" name="someCategory" value="someValue">` Example (edit this page to see the source) : * <form action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/Know/"> New <span style="background:"><font color="">Public FAQ</font></span><a href="http://LOCATIONKnow/PublicFAQ">?</a> topic: <input name="topic" size="32" type="text" /> <input name="TopicClassification" type="hidden" value="PublicFAQ" /> <input name="OperatingSystem" type="hidden" value="OsSolaris,OsSunOS" /> <input name="OsVersion" type="hidden" value="Just testing..." /> <input name="onlywikiname" type="hidden" value="on" /> <input type="submit" value="Create Topic" /></form> --- [[Main/PeterThoeny]] - 26 Feb 2001 <br /> +-- [[RandyKramer]] - 26 Feb 2001 <br /> -- [[Main/PeterThoeny]] - 04 Mar 2001 <br /> |