diff options
Diffstat (limited to 'TWiki')
-rw-r--r-- | TWiki/MetaDataDefinition.mdwn | 99 |
1 files changed, 80 insertions, 19 deletions
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% <a name="MetaDataDefinition"></a> -## <a name="Meta_Data_Definition"> Meta Data Definition </a> +## <a name="TWiki_Meta_Data"> TWiki Meta Data </a> -See [[TWikiDocumentation]] for variables used to display meta data. +### <a name="Meta_Data_Definition"> Meta Data Definition </a> + +See Meta Data Rendering for variables used to display meta data. Current version: **1\.0** -### <a name="Example_of_format"> Example of format </a> +#### <a name="Example_of_format"> Example of format </a> %<nop>META:TOPICINFO{version="1.6" date="976762663" author="PeterThoeny" format="1.0"}% text of the topic @@ -18,7 +20,7 @@ Current version: **1\.0** %<nop>META:FIELD{name="OperatingSystem" value="OsWin"}% %<nop>META:FIELD{name="TopicClassification" value="PublicFAQ"}% -### <a name="General_notes"> General notes </a> +#### <a name="General_notes"> General notes </a> * 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 <code>**%\_N\_**</code> and '"' by <code>**%\_Q\_%**</code> -### <a name="Logical_order"> Logical order </a> +#### <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: @@ -48,9 +50,9 @@ So the order is: * FORM - optional * FIELD - 0 or more entries (FORM required) -### <a name="Specification"> Specification </a> +#### <a name="Specification"> Specification </a> -#### <a name="TOPICINFO"> </a> TOPICINFO +##### <a name="TOPICINFO"> </a> TOPICINFO <table border="1" cellpadding="1" cellspacing="0"> <tr> @@ -75,7 +77,7 @@ So the order is: </tr> </table> -#### <a name="TOPICMOVED"> </a> TOPICMOVED +##### <a name="TOPICMOVED"> </a> 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. -#### <a name="TOPICPARENT"> </a> TOPICPARENT +##### <a name="TOPICPARENT"> </a> TOPICPARENT <table border="1" cellpadding="1" cellspacing="0"> <tr> @@ -122,7 +124,7 @@ Notes: </tr> </table> -#### <a name="FILEATTACHMENT"> </a> FILEATTACHMENT +##### <a name="FILEATTACHMENT"> </a> FILEATTACHMENT <table border="1" cellpadding="1" cellspacing="0"> <tr> @@ -184,7 +186,7 @@ Extra field that are added if an attachment is moved: </tr> </table> -#### <a name="FORM"> </a> FORM +##### <a name="FORM"> </a> FORM <table border="1" cellpadding="1" cellspacing="0"> <tr> @@ -197,7 +199,7 @@ Extra field that are added if an attachment is moved: </tr> </table> -#### <a name="FIELD"> </a> FIELD +##### <a name="FIELD"> </a> 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 </tr> </table> -### <a name="Viewing_meta_data"> Viewing meta data </a> +#### <a name="Viewing_meta_data"> Viewing meta data </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> + +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) +<a name="MetaDataRendering"></a> -### <a name="Other"> Other </a> +### <a name="Meta_Data_Rendering"> Meta Data Rendering </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 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: + +<table border="1" cellpadding="1" cellspacing="0"> + <tr> + <th bgcolor="#99CCCC"><strong>Variable usage:</strong></th> + <th bgcolor="#99CCCC"><strong>Comment:</strong></th> + </tr> + <tr> + <td> %<nop>META{"form"}% </nop></td> + <td> Show form data, see <span style="background:"><font color="">Form Templates</font></span><a href="http://LOCATION/TWikiDocumentation">?</a></td> + </tr> + <tr> + <td> %<nop>META{"attachments"}% </nop></td> + <td> Show attachments, exclude hidden </td> + </tr> + <tr> + <td> options for attachments: </td> + </tr> + <tr> + <td> all="on" </td> + <td> Show ALL attachments (including hidden) </td> + </tr> + <tr> + <td> %<nop>META{"moved"}% </nop></td> + <td> Details of any topic moves </td> + </tr> + <tr> + <td> %<nop>META{"parent [options]"}% </nop></td> + <td> Show topic parent </td> + </tr> + <tr> + <td> options for parent: </td> + </tr> + <tr> + <td> dontrecurse="on" </td> + <td> By default recurses up tree, at some cost </td> + </tr> + <tr> + <td> prefix="..." </td> + <td> Prefix for parents, only if there are parents; default "" </td> + </tr> + <tr> + <td> suffix="..." </td> + <td> Suffix, only appears if there are parents; default "" </td> + </tr> + <tr> + <td> seperator="..." </td> + <td> Separator between parents, default is " &gt; " </td> + </tr> +</table> -%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 <br /> +-- [[JohnTalintyre]] - 29 Aug 2001 <br /> |