Tags:
create new tag
view all tags

Question

I have tried the documented format for accessing metadata but can't get it to work? Does it only work in templates and not in normal text? I expected that putting %META{"parent"}% in a topic would expand to be a link to the parent. Is this possible?

  • TWiki version: 01Dec2001
  • Web server: Apache
  • Server OS: Linux
  • Web browser:
  • Client OS:

-- DarrylGreen - 22 Jul 2002

Answer

Not necessarily a solution to your problem, but there is some information regarding similar (I think) isssues in FormattedTWikiFormDataInTopicText. The stuff mentioned in there could easily be modified to access any kind of TWikiMetaData, not just TWikiForms.

-- DavidSachitano - 22 Jul 2002

Thanks for the pointer - if I really need access to parent I'll have to try my hand at perl hacking. As it is I've worked around the problem for my current work by making sure the topic gets created with an "owning topic" form field filled in. I can then access it using the formatted search technique as I have been doing for other data (at least until your change as described in FormattedTWikiFormDataInTopicText makes it into a release).

-- DarrylGreen - 23 Jul 2002

Use a formatted search until we have SimplifyInternalMetaDataHandling in place.

-- PeterThoeny - 23 Jul 2002

I think it is worth noting (unless I have done something else wrong) that formattted search works for form data but doesn't work to get the META:PARENT information presumably because this data doesn't actually seem to be in the topic text (cant see it with raw=debug specified).

I also still don't understand why the META{"parent"} doesn't work - is this a bug, a documentation problem or a user (me) is just stoopid problem?

-- DarrylGreen - 24 Jul 2002

Reason why not: Have a look at CVSget:bin/view, the meta tag handling (by calling TWiki::handleMetaTags) is done only for the template, not the topic text.

SimplifyInternalMetaDataHandling will fix that.

The parent meta data is stored in the topic (for those who have a parent set). It is of form %META:TOPICPARENT{name="WebHome"}%

-- PeterThoeny - 24 Jul 2002

Is there a good way to get the date a file attachment was uploaded, so it can be displayed in the topic text?

-- WesleySheldahl - 08 Aug 2002

This is only possible with a custom plugin. You could introduce a new variable, for example %FILEATTACHMENTATTRIBUTE{ name="..." format="$date" }%

FYI, the raw format of an attache file looks like this, taking the example of the attached file:

%META:FILEATTACHMENT{name="pencil.gif" attr="" comment="Pencil test" date="1028870153" path="C:\DATA\pencil.gif" size="172" user="PeterThoeny" version="1.1"}%

The plugin could TWiki::Func::readTopic( $web, $topic ), extract the date, convert from seconds to a readable format and expand the variable.

-- PeterThoeny - 09 Aug 2002

Topic attachments
I Attachment History Action Size Date Who Comment
GIFgif pencil.gif r1 manage 0.2 K 2002-08-09 - 05:15 PeterThoeny Pencil test
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2002-08-09 - 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.