From ab5139c9a2cfd48bb4a6331c4575406737c6b7e2 Mon Sep 17 00:00:00 2001 From: MikeMannix Date: Fri, 31 Aug 2001 23:10:48 +0000 Subject: none --- TWiki/MetaDataDefinition.mdwn | 93 +++++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 44 deletions(-) (limited to 'TWiki/MetaDataDefinition.mdwn') diff --git a/TWiki/MetaDataDefinition.mdwn b/TWiki/MetaDataDefinition.mdwn index a065c246..0bd6dcd9 100644 --- a/TWiki/MetaDataDefinition.mdwn +++ b/TWiki/MetaDataDefinition.mdwn @@ -2,25 +2,17 @@ ## TWiki Meta Data -### Meta Data Definition +### What is Meta Data in TWiki? -See Meta Data Rendering for variables used to display meta data. +**_What, indeed!_** -Current version: **1\.0** +### Defining Meta Data Variables -#### Example of format +See Meta Data Rendering for variables used to display meta data. - %META:TOPICINFO{version="1.6" date="976762663" author="PeterThoeny" format="1.0"}% - text of the topic - %META:TOPICMOVED{from="Codev.OldName" to="CoDev.NewName" by="JohnTalintyre" date="976762680"}% - %META:TOPICPARENT{name="NavigationByTopicContext"}% - %META:FILEATTACHMENT{name="Sample.txt" version="1.3" ... }% - %META:FILEATTACHMENT{name="Smile.gif" version="1.1" ... }% - %META:FORM{name="WebFormTemplate"}% - %META:FIELD{name="OperatingSystem" value="OsWin"}% - %META:FIELD{name="TopicClassification" value="PublicFAQ"}% +Current version: **1\.0** -#### General notes +#### Syntax * Format is as for \[[TWikiDocumentation#TWiki\_Variables, except all fields have a key. * %META:<type>\{key1="value1" [key2="value2" [...]]\}% @@ -28,29 +20,20 @@ Current version: **1\.0** * Each meta variable is on one line * '\\n' is represented in values by **%\_N\_** and '"' by **%\_Q\_%** -#### Logical order - -There no absolute need for meta data to be in a specific order, however, it does for the following reasons: - -* Keep (form) fields in the order they are defined -* Allow diff command to give output in a logically sensible order - -These could be done in other ways, but this adds complexity - -* Order fields - definition could be read on each rendering (expensive) -* Diff - render data before doing diff, has something to offer, but not likely to be available for next TWiki release - -So the order is: - -* TOPICINFO -* text of topic -* TOPICMOVED - optional -* TOPICPARENT - optional -* FILEATTACHMENT - 0 or more entries -* FORM - optional -* FIELD - 0 or more entries (FORM required) - -#### Specification +> **Example of Format** +> +> %META:TOPICINFO{version="1.6" date="976762663" author="PeterThoeny" format="1.0"}% +> text of the topic +> %META:TOPICMOVED{from="Codev.OldName" to="CoDev.NewName" +> by="JohnTalintyre" date="976762680"}% +> %META:TOPICPARENT{name="NavigationByTopicContext"}% +> %META:FILEATTACHMENT{name="Sample.txt" version="1.3" ... }% +> %META:FILEATTACHMENT{name="Smile.gif" version="1.1" ... }% +> %META:FORM{name="WebFormTemplate"}% +> %META:FIELD{name="OperatingSystem" value="OsWin"}% +> %META:FIELD{name="TopicClassification" value="PublicFAQ"}% + +#### Specifications ##### TOPICINFO @@ -222,19 +205,41 @@ Should only be present if there is a FORM entry. Note that this data is used whe -#### Viewing meta data +#### Recommended Sequence + +There no absolute need for meta data variables to be in a specific order, however, it does for the following reasons: + +* Keep (form) fields in the order they are defined +* Allow diff command to give output in a logically sensible order + +These could be done in other ways, but this adds complexity + +* Order fields - definition could be read on each rendering (expensive) +* Diff - render data before doing diff, has something to offer, but not likely to be available for next TWiki release + +So the order is: + +* TOPICINFO +* text of topic +* TOPICMOVED - optional +* TOPICPARENT - optional +* FILEATTACHMENT - 0 or more entries +* FORM - optional +* FIELD - 0 or more entries (FORM required) + +#### Viewing Meta Data in Page Source 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 +#### Future Support for Plugins 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. -### Meta Data Rendering +### Rendering Meta Data -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. +Various types of 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: @@ -287,8 +292,8 @@ Current support is fairly basic: -* **Possible future additions:** - * Rendering of form data to alternate formats, ex: bullet lists - * Specify a template to be used for rendering +* **Future Development:** There are numerous development directions and specific features to consider. A couple of obvious possibilities: + * Rendering to formats other than tables: bullet lists, formatted body text; + * Specifying templates to be used for rendering. -- [[JohnTalintyre]] - 29 Aug 2001
-- cgit v1.2.3