r3 - 2001-02-26 - 21:14:12 - PeterThoenyYou are here: NTP >  TWiki Web > TWikiCategoryTable
NTP users are strongly urged to take immediate action to ensure that their NTP daemons are not susceptible to being used in distributed denial-of-service (DDoS) attacks. Please also take this opportunity to defeat denial-of-service attacks by implementing Ingress and Egress filtering through BCP38.

ntp-4.2.8p15 was released on 23 June 2020. It addresses 1 medium-severity security issue in ntpd, and provides 13 non-security bugfixes over 4.2.8p13.

Please see the NTP Security Notice for vulnerability and mitigation details.

Are you using Autokey in production? If so, please contact Harlan - he's got some questions for you.
What is a Category Table?

It is possible to add a Category Table to a NTP 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:


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

# comments start with a # character


  {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

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!


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

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



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


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

-- PeterThoeny - 26 Feb 2001

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r7 | r5 < r4 < r3 < r2 | More topic actions...
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NTP? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiCategoryTable