Tags:
create new tag
, view all tags

SID-02281: Show Attachment Revision

Status: Asked Asked TWiki version: 5.1.0 Perl version: 5.8.8
Category: AttachmentListPlugin Server OS: Windows Server 2003 Last update: 2 months ago

Is there a way to show an Attachment's revision number on another topic ?

-- Rajesh N - 2016-12-13

Discussion and Answer

I'm not familiar with AttachmentListPlugin and I'm not certain exactly what you are trying to achieve but maybe this could point you in the right direction?

It uses a query search QuerySearch to isolate a specific topic and then search the meta data of that topic. Then SpreadSheetPlugin functions are used to create two lists, combine them, and add line breaks between each entry.

%SEARCH{"name~'*%TOPIC%'" web="%WEB%" type="query" nonoise="on" 
format="$percntCALCULATE{$SETLIST(AttachmentName, $query(attachments.name)) $SETLIST(AttachmentRevision, $query(attachments.version)) $LISTJOIN(<br>, $LISTEACH(Attachment name: $item - Revision $LISTITEM( $index, $GETLIST(AttachmentRevision)), $GETLIST(AttachmentName)))}$percnt"}%

Put the search above into the topic where you wish to display the attachment(s) and their revision(s). Replace %TOPIC% with the name of the topic you want to search for attachment(s).

Hope this is helpful but if not can you please elaborate on your question? Perhaps provide an example?

-- Jani Hamalainen - 2016-12-15

      Change status to:
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.
SupportForm
Status Asked
Title Show Attachment Revision
SupportCategory AttachmentListPlugin
TWiki version 5.1.0
Server OS Windows Server 2003
Web server Apache
Perl version 5.8.8
Browser & version IE 11
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2016-12-15 - JaniHamalainen
 
  • 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.