Question
Hi,
I have a file attached to a topic and I would like to display the attachment's comments within the body of the topic.
Is this possible?
Environment
--
BehrouzBayat - 07 Jul 2006
Answer
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.
Looks like a job for
FormQueryPlugin. The
FormQueryPluginTutorial which has an example which comes close to your usage.
--
HaraldJoerg - 07 Jul 2006
TWiki does not support that at the moment. Not until
ContentAccessSyntax is implemented.
In the mean time you could write a simple Plugin that pulls the info and displays it via a variable, such as:
%ATTACHINFO{ format="$comment" file="Foobar.doc" }%
--
PeterThoeny - 07 Jul 2006
Peter - no need for a new plugin, an existing one will do. I admit that
FormQueryPlugin is a bit of overkill, but nevertheless:
%FORMQUERY{name=Allatts search="name='%TOPIC%'" extract="attachments"}%
%SHOWQUERY{query=Allatts header="|*Name*|*Comment*|" format="|$name|$comment|"}%
The tricky part will be to download the version of the plugin which supports
TWikiRelease04Sep2004 - you'll need to click the "manage" link in the attachments table to pick up the 2004 release of both
FormQueryPlugin and
DBCacheContrib.
--
HaraldJoerg - 07 Jul 2006
related:
--
VickiBrown - 25 Mar 2008
See also
AttachmentListPlugin.
--
ArthurClemens - 25 Mar 2008