diff options
Diffstat (limited to 'TWiki/MetaDataDefinition.mdwn')
-rw-r--r-- | TWiki/MetaDataDefinition.mdwn | 93 |
1 files changed, 49 insertions, 44 deletions
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 @@ ## <a name="TWiki_Meta_Data"> TWiki Meta Data </a> -### <a name="Meta_Data_Definition"> Meta Data Definition </a> +### <a name="What_is_Meta_Data_in_TWiki_"> What is Meta Data in TWiki? </a> -See Meta Data Rendering for variables used to display meta data. +**_What, indeed!_** -Current version: **1\.0** +### <a name="Defining_Meta_Data_Variables"> Defining Meta Data Variables </a> -#### <a name="Example_of_format"> Example of format </a> +See Meta Data Rendering for variables used to display meta data. - %<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"}% +Current version: **1\.0** -#### <a name="General_notes"> General notes </a> +#### <a name="Syntax"> Syntax </a> * 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 <code>**%\_N\_**</code> and '"' by <code>**%\_Q\_%**</code> -#### <a name="Logical_order"> Logical order </a> - -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) - -#### <a name="Specification"> Specification </a> +> **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"}% + +#### <a name="Specifications"> Specifications </a> ##### <a name="TOPICINFO"> </a> TOPICINFO @@ -222,19 +205,41 @@ Should only be present if there is a FORM entry. Note that this data is used whe </tr> </table> -#### <a name="Viewing_meta_data"> Viewing meta data </a> +#### <a name="Recommended_Sequence"> Recommended Sequence </a> + +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) + +#### <a name="Viewing_Meta_Data_in_Page_Source"> Viewing Meta Data in Page Source </a> When viewing a topic the <code>**Raw Text**</code> 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) -#### <a name="Future_Plugins_support"> Future Plugins support </a> +#### <a name="Future_Support_for_Plugins"> Future Support for Plugins </a> 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. <a name="MetaDataRendering"></a> -### <a name="Meta_Data_Rendering"> Meta Data Rendering </a> +### <a name="Rendering_Meta_Data"> Rendering Meta Data </a> -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 <code>**view**</code>, <code>**preview**</code> and <code>**edit**</code> scripts. Current support is fairly basic: @@ -287,8 +292,8 @@ Current support is fairly basic: </tr> </table> -* **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 <br /> |