Tags:
create new tag
view all tags
First, let me aplogize for the topic name, but I could not come up with a better description. Anyway, the problem I wanted to solve was the following: In a web, a user wanted several areas where attachments could be added (where by attachment area I mean the expansion of =
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatgz MultipleAttachmentsAreas.tar.gz r1 manage 2.5 K 2002-10-13 - 23:25 UnknownUser Patches to standard files
=). In this particular application, the user wanted two areas representing different types of attachments.

The patch attached below supports this user need. It adds an optional parameter filter to the =

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatgz MultipleAttachmentsAreas.tar.gz r1 manage 2.5 K 2002-10-13 - 23:25 UnknownUser Patches to standard files
= construct. The attachment area generated by the expansion of this META variable will include only those attachments that have the appropriate filter attribute set. For this purpose, the attach script takes an additional parameter, filter. Finally, if the =
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatgz MultipleAttachmentsAreas.tar.gz r1 manage 2.5 K 2002-10-13 - 23:25 UnknownUser Patches to standard files
= construct is not given a filter parameter, it displays all attachments.

Attached is an example topic thus generated. To support this particular example, I modified view.tmpl for the particular web as shown attached.

In this example, there are two attachment areas, where documents can be added to using the links "Attach analysis" and "Attach reference". These links send the appropriate filter parameter to the attach script.

Possible improvements: The attachments META variable is not expanded in normal text, so this feature requires that the view.tmpl be modified. It would be nice if the attachment areas could be placed in the user text at will (which would also require control over the automatic attachment area currently generated by view.tmpl.

-- ThomasWeigert - 13 Oct 2002

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatgz MultipleAttachmentsAreas.tar.gz r1 manage 2.5 K 2002-10-13 - 23:25 UnknownUser Patches to standard files
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2002-10-27 - ThomasWeigert
 
  • 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.