On this page:
TWiki Meta DataTopic data not editable from main freeform text box, stored in name/valueMETA variable pairs
OverviewTWikiMetaData usesMETA variables to store topic data that's separate from the main free-form content. This includes program-generated info like FileAttachment data, and user-defined Form Template info.
Meta Data Syntax
Example of Format%<nop>META:TOPICINFO{version="1.6" date="976762663" author="PeterThoeny" format="1.0"}% text of the topic %<nop>META:TOPICMOVED{from="Codev.OldName" to="CoDev.NewName" by="JohnTalintyre" date="976762680"}% %<nop>META:TOPICPARENT{name="NavigationByTopicContext"}% %<nop>META:FILEATTACHMENT{name="Sample.txt" version="1.3" ... }% %<nop>META:FILEATTACHMENT{name="Smile.gif" version="1.1" ... }% %<nop>META:FORM{name="WebFormTemplate"}% %<nop>META:FIELD{name="OperatingSystem" value="OsWin"}% %<nop>META:FIELD{name="TopicClassification" value="PublicFAQ"}% SpecificationsThe current version of Meta Data is 1.0, with support for the following variables.TOPICINFO
TOPICMOVEDThis 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. %META:TOPICMOVED{from="Codev.OldName" to="CoDev.NewName" by="talintj" date="976762680"}%
TOPICPARENT
FILEATTACHMENT
FORM
FIELDShould 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.
Recommended Sequence | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | There no absolute need for meta data variables to be in a specific order, however, it does for the following reasons: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | There is no absolute need for Meta Data variables to be listed in a specific order within a topic, but it makes sense to do so a couple of good reasons: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | These could be done in other ways, but this adds complexity
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | So the order is: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | The recommended sequence is: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Viewing Meta Data in Page SourceWhen viewing a topic theRaw 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
Rendering Meta Data | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Meta Data is rendered with the %META% variable. This is mostly used in the view , preview and edit scripts. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Meta Data is rendered with the %META% variable. This is mostly used in the view , preview and edit scripts. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Current support is fairly basic: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Current support covers: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Known Issues | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | At present, there is no Meta Data support for Plugins. However, the format is readily extendable and the Meta.pm code that supports the format needs only minor alteration. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-- JohnTalintyre - 29 Aug 2001 |