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 =
=). 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 =
= 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 =
= 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