netfrag.org > TWiki > TWikiCategoryTable (r1.1 vs. r1.7)
TWiki . { Home? | Welcome | Register | Changes | Index | Search | Go }

 <<O>>  Difference Topic TWikiCategoryTable (r1.7 - 18 Sep 2001 - PeterThoeny?)
Line: 1 to 1
Changed:
<
<

Dev Reorg


TWiki Category Table

What is a Category Table?

It is possible to add a Category Table to a netfrag.org web. It allows you to categorize and classify a topic, e.g. give some structure to the content of a web.

The Category Table is located at the end of a topic. Example:

TopicClassification:
PublicFAQ
OperatingSystem:
OsSolaris

When you edit the topic you see below the usual text area a table that includes widgets (controls) like drop-down menus, checkboxes, radio buttons, and text boxes. It makes it easy to provide keywords to categorize a topic. Example:

UseCategory :
Yes    No, delete this category table   
TopicClassification :
OperatingSystem :
   
OsSolaris    OsSunOS    OsHPUX    OsWin   

The format of the Category Table can be defined per netfrag.org web.

One sample application is a knowledge base for customer support. The web for customer support contains internal documents, FAQ entries and knowledge base entries. Topics are classified accordingly. In addition, FAQ entries and knowledge base entries can be categorized i.e. by the software product anf the operating system. For the operating system category, a checkbox contains OsSolaris, OsSunOS, OsHPUX and OsWin.

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

The Category Table is defined by some template files. To add a Category Table to your netfrag.org web you need to place the following three files into the twiki/templates/{Yourweb} 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

Format of Category Definition Template File twikicatitems.tmpl

Valid lines:

select|{name}|{selSize}|{val1}|{val2}|{val3}...
checkbox|{name}|{checkFlag}|{itemsPerLine}|{val1}|{val2}|{val3}...
radio|{name}|{itemsPerLine}|{val1}|{val2}|{val3}...
text|{name}|{charSize}
# comments start with a # character

Explanation:

  {name}             name of tag
  {selSize}          vertical size of SELECT tag
  {val1}|{val2}...   values
  {checkFlag}        set to true for [Set] [Clear] buttons, else set to false
  {itemsPerLine}     input items per line before wrap around, 0 if no wrap around
  {charSize}         number of characters for text fields

Remark: Line radio|UseCategory|0|Yes|No has a special meaning. If present, it is possible to choose in "edit" if the category table is included in the topic or not

Example file:

radio|UseCategory|0|Yes|No, delete this category table
select|TopicClassification|1|Select one...|NoDisclosure|PublicSupported|PublicFAQ
checkbox|OperatingSystem|true|5|OsSolaris|OsSunOS|OsHPUX|OsWin
text|OsVersion|16

Format of twikicatedit.tmpl and twikicatview.tmpl

Use the example below and customize if needed. twikicatedit.tmpl and twikicatview.tmpl 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!

Example:

<!--TWikiCat--> <h4> TWikiCategory </h4>
<table border="2" cellspacing="1" cellpadding="1">
%REPEAT%<tr>
<td valign="top" align="right"> %CATNAME%:  <br>%CATMODIFIER%</td><td>  %CATVALUE% </td>
</tr>%REPEAT%
</table><!--TWikiCat-->

Above template files will result in the following category table when viewing a topic:

TWikiCategory

TopicClassification:
PublicFAQ
OperatingSystem:
OsSolaris
OsVersion:
<!---->2.5<!----> 

Above template files will result in the following table when editing a topic:

TWikiCategory

UseCategory :
Yes    No, delete this category table   
TopicClassification :
OperatingSystem :
   
OsSolaris    OsSunOS    OsHPUX    OsWin   
OsVersion :

Default Values for a Category Table

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.

Default Topic Template

Whenever you create a new topic, the twiki/templates/Webname/notedited.tmpl 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 notedited.tmpl template (including the Category Table). Look also at the twiki/templates/Know/notedited.tmpl included in the distribution.

Set Individual Category Table Values

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) :

  • New PublicFAQ? topic:

-- RandyKramer - 26 Feb 2001
-- PeterThoeny? - 04 Mar 2001

>
>
Note: This feature has been replaced by: TWikiForms

 <<O>>  Difference Topic TWikiCategoryTable (r1.6 - 12 Sep 2001 - MikeMannix?)
Line: 1 3 to 1 3
Changed:
<
<
  • This feature has been replaced by: TWikiFormTemplate?
>
>

 <<O>>  Difference Topic TWikiCategoryTable (r1.5 - 01 Sep 2001 - MikeMannix?)
Line: 0 to 1
Added:
>
>

Dev Reorg

  • This feature has been replaced by: TWikiFormTemplate?



 <<O>>  Difference Topic TWikiCategoryTable (r1.4 - 04 Mar 2001 - PeterThoeny?)
Line: 1 to 1
Changed:
<
<
What is a Category Table?
>
>

TWiki Category Table

What is a Category Table?

Line: 58 to 60
Changed:
<
<
How to Define a Category Table
>
>

How to Define a Category Table

Line: 60 to 62
Changed:
<
<
The Category Table is defined by some template files. To add a Category Table to your netfrag.org web you need to place the following three files into the twiki/templates/{Yourweb} 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
>
>
The Category Table is defined by some template files. To add a Category Table to your netfrag.org web you need to place the following three files into the twiki/templates/{Yourweb} 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
Line: 66 to 68
Changed:
<
<
Format of Category Definition Template File twikicatitems.tmpl
>
>

Format of Category Definition Template File twikicatitems.tmpl

Line: 97 to 99
Changed:
<
<
Format of twikicatedit.tmpl and twikicatview.tmpl
>
>

Format of twikicatedit.tmpl and twikicatview.tmpl

Line: 99 to 101
Changed:
<
<
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. twikicatedit.tmpl and twikicatview.tmpl can be identical, but they do not have to be.
Line: 101 to 103
Changed:
<
<
Attention: <!--TWikiCat--> is needed at the beginning and end as markers. Do not delete them!
>
>
Attention: <!--TWikiCat--> is needed at the beginning and end as markers. Do not delete them!
Line: 166 to 168
Changed:
<
<
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">
>
>

Default Values for a Category Table

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.

Default Topic Template

Whenever you create a new topic, the twiki/templates/Webname/notedited.tmpl 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 notedited.tmpl template (including the Category Table). Look also at the twiki/templates/Know/notedited.tmpl included in the distribution.

Set Individual Category Table Values

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">

Line: 171 to 184
Changed:
<
<
-- PeterThoeny? - 26 Feb 2001
>
>
-- RandyKramer - 26 Feb 2001
-- PeterThoeny? - 04 Mar 2001

 <<O>>  Difference Topic TWikiCategoryTable (r1.3 - 26 Feb 2001 - PeterThoeny?)
Line: 3 to 3
Changed:
<
<
A Category Table is a table that can include drop-down menus, checkboxes, radio buttons, and text fields. It makes it easy to provide keywords to categorize a topic.
>
>
It is possible to add a Category Table to a netfrag.org web. It allows you to categorize and classify a topic, e.g. give some structure to the content of a web.
Line: 5 to 5
Changed:
<
<
For example, if a TWiki web is devoted to technical support, wiki topics might be incident reports. The Category Table can prompt the writer to select the operating system, the software product, and the version for this report. For the operating system category, checkboxes can be displayed for OsSolaris, OsSunOS, OsHPUX and OsWin.
>
>
The Category Table is located at the end of a topic. Example:
Line: 7 to 7
Changed:
<
<
Using a Category Table
>
>
TopicClassification:
PublicFAQ
OperatingSystem:
OsSolaris
Line: 9 to 15
Changed:
<
<
It is possible to add a category table to a TWiki web. This permits storing and searching for more structured information. Editing a topic shows a HTML form with the usual text area and a table with selectors, checkboxes, radio buttons and text fields. The category table is shown at the end of a topic. The format of the category table can be defined per TWiki web.
>
>
When you edit the topic you see below the usual text area a table that includes widgets (controls) like drop-down menus, checkboxes, radio buttons, and text boxes. It makes it easy to provide keywords to categorize a topic. Example:
Line: 11 to 17
Changed:
<
<
If you want to add a Category Table in a TWiki web you need to place the following three files into the twiki/templates/{Yourweb} directory:
>
>
UseCategory :
Yes    No, delete this category table   
TopicClassification :
OperatingSystem :
   
OsSolaris    OsSunOS    OsHPUX    OsWin   

The format of the Category Table can be defined per netfrag.org web.

One sample application is a knowledge base for customer support. The web for customer support contains internal documents, FAQ entries and knowledge base entries. Topics are classified accordingly. In addition, FAQ entries and knowledge base entries can be categorized i.e. by the software product anf the operating system. For the operating system category, a checkbox contains OsSolaris, OsSunOS, OsHPUX and OsWin.

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

The Category Table is defined by some template files. To add a Category Table to your netfrag.org web you need to place the following three files into the twiki/templates/{Yourweb} directory:

Line: 16 to 65
Changed:
<
<
Format of category definition template twikicatitems.tmpl
>
>

Format of Category Definition Template File twikicatitems.tmpl

Line: 116 to 166
Changed:
<
<
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">
>
>
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">
Line: 121 to 171
Changed:
<
<
-- PeterThoeny? - 21 Apr 2000
>
>
-- PeterThoeny? - 26 Feb 2001

 <<O>>  Difference Topic TWikiCategoryTable (r1.2 - 22 Dec 2000 - PeterThoeny?)
Line: 0 to 1
Added:
>
>
What is a Category Table?

A Category Table is a table that can include drop-down menus, checkboxes, radio buttons, and text fields. It makes it easy to provide keywords to categorize a topic.

For example, if a TWiki web is devoted to technical support, wiki topics might be incident reports. The Category Table can prompt the writer to select the operating system, the software product, and the version for this report. For the operating system category, checkboxes can be displayed for OsSolaris, OsSunOS, OsHPUX and OsWin.

Using a Category Table

Line: 3 to 11
Changed:
<
<
If you want to use a Category Table in a TWiki web you need to have the following three files in the twiki/templates/{Yourweb} 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
>
>
If you want to add a Category Table in a TWiki web you need to place the following three files into the twiki/templates/{Yourweb} 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
Line: 8 to 16
Changed:
<
<
Format of category definition template twikicatitems.tmpl
>
>
Format of category definition template twikicatitems.tmpl
Line: 29 to 37
Changed:
<
<
Remark: Line radio|UseCategory|0|Yes|No has a special meaning. If present, it is possible to choose in "edit" if the category table is included in the topic or not
>
>
Remark: Line radio|UseCategory|0|Yes|No has a special meaning. If present, it is possible to choose in "edit" if the category table is included in the topic or not
Line: 39 to 47
Changed:
<
<
Format of twikicatedit.tmpl and twikicatview.tmpl
>
>
Format of twikicatedit.tmpl and twikicatview.tmpl
Line: 41 to 49
Changed:
<
<
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. twikicatedit.tmpl and twikicatview.tmpl can be identical, but they do not have to be.
Line: 43 to 51
Changed:
<
<
Attention: <!--TWikiCat--> is needed at the beginning and end as markers. Do not delete them!
>
>
Attention: <!--TWikiCat--> is needed at the beginning and end as markers. Do not delete them!
Line: 55 to 63
Changed:
<
<
Above template files will result in the following category table when viewing a topic:
>
>
Above template files will result in the following category table when viewing a topic:
Line: 68 to 76
Changed:
<
<
Above template files will result in the following table when editing a topic:
>
>
Above template files will result in the following table when editing a topic:

 <<O>>  Difference Topic TWikiCategoryTable (r1.1 - 22 Apr 2000 - PeterThoeny?)
Line: 1 to 1
Added:
>
>
It is possible to add a category table to a TWiki web. This permits storing and searching for more structured information. Editing a topic shows a HTML form with the usual text area and a table with selectors, checkboxes, radio buttons and text fields. The category table is shown at the end of a topic. The format of the category table can be defined per TWiki web.

If you want to use a Category Table in a TWiki web you need to have the following three files in the twiki/templates/{Yourweb} 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

Format of category definition template twikicatitems.tmpl

Valid lines:

select|{name}|{selSize}|{val1}|{val2}|{val3}...
checkbox|{name}|{checkFlag}|{itemsPerLine}|{val1}|{val2}|{val3}...
radio|{name}|{itemsPerLine}|{val1}|{val2}|{val3}...
text|{name}|{charSize}
# comments start with a # character

Explanation:

  {name}             name of tag
  {selSize}          vertical size of SELECT tag
  {val1}|{val2}...   values
  {checkFlag}        set to true for [Set] [Clear] buttons, else set to false
  {itemsPerLine}     input items per line before wrap around, 0 if no wrap around
  {charSize}         number of characters for text fields

Remark: Line radio|UseCategory|0|Yes|No has a special meaning. If present, it is possible to choose in "edit" if the category table is included in the topic or not

Example file:

radio|UseCategory|0|Yes|No, delete this category table
select|TopicClassification|1|Select one...|NoDisclosure|PublicSupported|PublicFAQ
checkbox|OperatingSystem|true|5|OsSolaris|OsSunOS|OsHPUX|OsWin
text|OsVersion|16

Format of twikicatedit.tmpl and twikicatview.tmpl

Use the example below and customize if needed. twikicatedit.tmpl and twikicatview.tmpl 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!

Example:

<!--TWikiCat--> <h4> TWikiCategory </h4>
<table border="2" cellspacing="1" cellpadding="1">
%REPEAT%<tr>
<td valign="top" align="right"> %CATNAME%:  <br>%CATMODIFIER%</td><td>  %CATVALUE% </td>
</tr>%REPEAT%
</table><!--TWikiCat-->

Above template files will result in the following category table when viewing a topic:

TWikiCategory

TopicClassification:
PublicFAQ
OperatingSystem:
OsSolaris
OsVersion:
<!---->2.5<!----> 

Above template files will result in the following table when editing a topic:

TWikiCategory

UseCategory :
Yes    No, delete this category table   
TopicClassification :
OperatingSystem :
   
OsSolaris    OsSunOS    OsHPUX    OsWin   
OsVersion :

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">

Example (edit this page to see the source) :

  • New PublicFAQ? topic:

-- PeterThoeny? - 21 Apr 2000


Topic TWikiCategoryTable . { View | Diffs | r1.7 | > | r1.6 | > | r1.5 | More }    output as: { }
Revision r1.1 - 22 Apr 2000 - 00:47 - PeterThoeny?
Revision r1.7 - 18 Sep 2001 - 06:31 - PeterThoeny?