create new tag
, view all tags

See MetaDataRendering (when it appears).

Various meta data can be stored in topics - MetaDataDefinition

This is rendered using the %META% variable. This is mostly used in the view, preview and edit scripts.

Present Support

At present support is fairly basic:

Variable usage: Comment:
%META{"form"}% Show form data, see FormTemplateSystem
%META{"attachments"}% Show attachments, excluding hidden ones
options for attachments:
all="on" Show all attachments i.e. including hidden ones
%META{"moved"}% Details of any topic moves
%META{"parent" [options]}% Show topic parent
options for parent:
dontrecurse="on" By default recurses up tree, this has some cost
prefix="..." Prefix that goes before parents, but only if there are any, default ""
seperator="..." Seperator between parents, default is " > "

Note: Syntax for parent option corrected, ThomasWeigert, 07 Feb 2004

Possible future additions:

  • Rendering of form data to alternate formats e.g. bullet lists
  • Specify a template to be used for rendering

-- JohnTalintyre - 26 Jun 2001

I like that format. This is KISS but flexible!

-- PeterThoeny - 28 Jun 2001

But you can use it only in templates!

AndrewDSmart - 15 Oct 2002

Patch to support Rendering fields

In the past I wanted to render the field contents at random places on the page for various reasons. As a result I hacked up a modification so that suppose you have a WebForm with a field TopicClassification, with a value FeatureHack, you can:

You Type You Get
%META{formfield(TopicClassification)}% FeatureHack
%META{formfield( field name )}% field value

It's a rather simple modification, but very useful. The attached patch is against BeijingRelease.

-- MichaelSparks - 15 Jun 2003

A modified version is now in TWikiAlphaRelease; TWiki.TWikiMetaData doc is updated accordingly.

Synatx is %META{ "formfield" name="TopicClassification" }% to bring it in line with the TWiki norm.

Note that all %META{ ... }% currently only work in templates and skins, not topic text.

-- PeterThoeny - 18 Jun 2003

The attached patch to bin/view processes metatags also for the topic text. Similar changes could be made to other scripts. I have not assessed the performance implications of checking for meta data in the topic text.

Note that using MichaelSparks' patch can be used without attaching a form, as long as the metadata is stored using META:FIELD syntax.

-- ThomasWeigert - 19 Jun 2003

Just a note:

In SearchFormatFormField I mentioned that there culd be a problem with whether the "title" or the "name" is the key. PeterThoeny commented:

    This is debateable. It might make more sense to switch from "title" to "name", but this might break existing content.

While he's correct about breaking (some) existing content, the key should be unique if the action is to meet expection and be consistent and robust in the light of future code changes.

I agree with the semantics implicit in Michael's descripton.

-- AntonAylward - 19 Jun 2003

At DynamicFormOptionDefinitions (reference provided by PeterKlausner - 02 Jul 2003) is a patch that switches the key of meta data to "name". This allows to have titles that are not wiki words and still have the forms created from tables work. It also allows generating forms from searches, etc. For whatever it is worth, we have been using this feature for quite a while now and have seen no adverse effects...

-- ThomasWeigert - 20 Jun 2003

Category: TWikiPatches
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatpatch FORMFIELD.patch r1 manage 0.5 K 2003-06-15 - 15:31 UnknownUser Patch to allow rendering of field data
Unknown file formatdiff view.diff r1 manage 0.4 K 2003-06-19 - 02:17 ThomasWeigert Diff to bin/view
Edit | Attach | Watch | Print version | History: r20 < r19 < r18 < r17 < r16 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r20 - 2004-08-16 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.