Tags:
create new tag
view all tags

Question

So i'm well versed with creating new meta data in my plugins and have had good success doing this. However i now was hoping to create some new metadata similar to the way the META:FIELD data works.

With the META:FIELD type you can have multiple instances of it and return all of them. eg.

%META:FIELD{name="one" value="1"}%
%META:FIELD{name="two" value="2"}%
%META:FIELD{name="three" value="3"}%

Unfortunately it seems that this type of behaviour is only possible with the FIELD and FILEATTACHMENT meta data type as whenever i try it with any other name such as META:BASELINE (my desired one) it doesn't work. My $meta->find() call only returns an array of length 1. I tried this with some of the other native twiki meta types as well just for curiosities sake to no avail as well.

I did some digging in meta.pm and such without much luck. I suspect it has less to do with the find() function and more to do with the readTopic() that extracts the meta data.

Anyways I was hoping someone could either a) give me a quick answer like "this is totally unsupported" or b) "you're smoking crack, all you have to do is this ... " smile or c) a push in the right direction.

Thanks,

Brent.

Environment

TWiki version: TWikiRelease04Sep2004
TWiki plugins:  
Server OS: Windows Server 2003
Web server: IIS6
Perl version:  
Client OS:  
Web Browser:  
Categories: Plugins

-- BrentTokarchuk - 10 Apr 2006

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

You can have multiple values with any meta-data type. I know this works on TWiki-4 and I think it should work on Cairo as well. However for most of the types, the core code will assume single-valued (e.g. topic parent).

-- CrawfordCurrie - 11 Apr 2006

TWiki::Meta of Cairo has multiple keys hardcoded for META:FIELD and META:FILEATTACHMENT only, so you'd have to upgrade to TWiki 4.

-- PeterThoeny - 11 Apr 2006

Ok thanks peter. That's the answer i needed to know.

-- BrentTokarchuk - 11 Apr 2006

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2006-04-11 - BrentTokarchuk
 
  • 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.