From e21545fa94befed6fd0abb856e86640e8a5fc2a3 Mon Sep 17 00:00:00 2001 From: Peter Thoeny Date: Sat, 22 Apr 2000 00:47:40 +0000 Subject: none --- TWiki/TWikiCategoryTable.mdwn | 124 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 TWiki/TWikiCategoryTable.mdwn diff --git a/TWiki/TWikiCategoryTable.mdwn b/TWiki/TWikiCategoryTable.mdwn new file mode 100644 index 00000000..34d9c1b6 --- /dev/null +++ b/TWiki/TWikiCategoryTable.mdwn @@ -0,0 +1,124 @@ +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:\_** ` ` is needed at the beginning and end as markers. Do not delete them! + +Example: + +

TWikiCategory

+ + %REPEAT% + + %REPEAT% +
%CATNAME%:  
%CATMODIFIER%
  %CATVALUE%
+ +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. `` + +Example (edit this page to see the source) : + +*
New Public FAQ? topic:
+ +-- [[Main/PeterThoeny]] - 21 Apr 2000
-- cgit v1.2.3