From 0169b65a0a12f4b32f8c5c49eab15d26de0a0e89 Mon Sep 17 00:00:00 2001 From: MikeMannix Date: Thu, 30 Aug 2001 19:55:36 +0000 Subject: none --- TWiki/MetaDataDefinition.mdwn | 99 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 80 insertions(+), 19 deletions(-) (limited to 'TWiki') diff --git a/TWiki/MetaDataDefinition.mdwn b/TWiki/MetaDataDefinition.mdwn index 26e767fa..a065c246 100644 --- a/TWiki/MetaDataDefinition.mdwn +++ b/TWiki/MetaDataDefinition.mdwn @@ -1,12 +1,14 @@ -%TOC% %STARTINCLUDE% +%TOC% %STARTINCLUDE% -## Meta Data Definition +## TWiki Meta Data -See [[TWikiDocumentation]] for variables used to display meta data. +### Meta Data Definition + +See Meta Data Rendering for variables used to display meta data. Current version: **1\.0** -### Example of format +#### Example of format %META:TOPICINFO{version="1.6" date="976762663" author="PeterThoeny" format="1.0"}% text of the topic @@ -18,7 +20,7 @@ Current version: **1\.0** %META:FIELD{name="OperatingSystem" value="OsWin"}% %META:FIELD{name="TopicClassification" value="PublicFAQ"}% -### General notes +#### General notes * Format is as for \[[TWikiDocumentation#TWiki\_Variables, except all fields have a key. * %META:<type>\{key1="value1" [key2="value2" [...]]\}% @@ -26,7 +28,7 @@ Current version: **1\.0** * Each meta variable is on one line * '\\n' is represented in values by **%\_N\_** and '"' by **%\_Q\_%** -### Logical order +#### Logical order There no absolute need for meta data to be in a specific order, however, it does for the following reasons: @@ -48,9 +50,9 @@ So the order is: * FORM - optional * FIELD - 0 or more entries (FORM required) -### Specification +#### Specification -#### TOPICINFO +##### TOPICINFO @@ -75,7 +77,7 @@ So the order is:
-#### TOPICMOVED +##### TOPICMOVED This is optional, exists if topic has ever been moved. If a topic is moved more than once, only the most recent TOPICMOVED meta variable exists in the topic, older ones are to be found in the rcs history. @@ -109,7 +111,7 @@ Notes: * at present version number is not supported directly, it can be inferred from the RCS history. * there is only one META:TOPICMOVED in a topic, older move information can be found in the RCS history. -#### TOPICPARENT +##### TOPICPARENT @@ -122,7 +124,7 @@ Notes:
-#### FILEATTACHMENT +##### FILEATTACHMENT @@ -184,7 +186,7 @@ Extra field that are added if an attachment is moved:
-#### FORM +##### FORM @@ -197,7 +199,7 @@ Extra field that are added if an attachment is moved:
-#### FIELD +##### FIELD Should only be present if there is a FORM entry. Note that this data is used when viewing a topic, the form template definition is not read. @@ -220,14 +222,73 @@ Should only be present if there is a FORM entry. Note that this data is used whe -### Viewing meta data +#### Viewing meta data + +When viewing a topic the **Raw Text** link can be clicked to show the text of a topic (ie: as seen when editing). This is done by adding `raw=on` to URL. `raw=debug` shows the meta data as well as the topic data, ex: [debug view for this topic](%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/%TOPIC%?raw=debug) + +#### Future Plugins support + +There is currently no support for meta data for Plugins. However, the format is readily extendable and the `Meta.pm` code that supports the format needs only minor alteration. -When viewing a topic the `Raw Text` link can be clicked to show the text of a topic (i.e. as is seen when editing). This is done by adding `raw=on` to URL. `raw=debug` shows the meta data as well as the topic data e.g. [for this topic](%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/%TOPIC%?raw=debug) + -### Other +### Meta Data Rendering -There is currently no support for meta data for Plugins. However, the format is readily extendable and the `Meta.pm` code that supports the format only needs minor alteration. +Various meta data can be stored in topics. The data is rendered using the %META% variable. This is mostly used in the `view`, `preview` and `edit` scripts. + +Current support is fairly basic: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variable usage:Comment:
%META{"form"}% Show form data, see Form Templates?
%META{"attachments"}% Show attachments, exclude hidden
options for attachments:
all="on" Show ALL attachments (including hidden)
%META{"moved"}% Details of any topic moves
%META{"parent [options]"}% Show topic parent
options for parent:
dontrecurse="on" By default recurses up tree, at some cost
prefix="..." Prefix for parents, only if there are parents; default ""
suffix="..." Suffix, only appears if there are parents; default ""
seperator="..." Separator between parents, default is " &gt; "
-%INCLUDE\{"%TWIKIWEB%.MetaDataRendering"\}% +* **Possible future additions:** + * Rendering of form data to alternate formats, ex: bullet lists + * Specify a template to be used for rendering --- [[JohnTalintyre]] - 16 Aug 2001
+-- [[JohnTalintyre]] - 29 Aug 2001
-- cgit v1.2.3