[Moin-user] Force "get" action instead of "view" action in a link?
Thomas Waldmann
tw-public at gmx.de
Wed Oct 17 06:24:40 EDT 2007
Hi Martin,
> I'm running the latest 1.6 revision (see http://swindale.ecc.ubc.ca). I
> just updated from a previous revision several weeks old, and I've
> noticed that links to non-image attachments (say, pdfs) now take you to
> the attachment page where the browser tries to display them (say using
> Acrobat's pdf plugin). This is because links like this:
>
> [[attachment:filename.pdf]]
>
> now default to the "view" action instead of the "get" action like they
> used to.
Yeah, this is intended.
For download there is a link at top of the page you get.
BTW, this is a small step into the direction where we will go in the future.
After we have merged the storage backend work of Heinrich Wendel, made a
new storage backend storing data and metadata separately and finally
introducing mimetype items (unifying pages and attachments), that
attachment: and drawing: stuff will go away completely (and we will get
rid of lots of ugly code then).
After that work, you will just write [[/filename.pdf]] to link to a
sub-item (file) of the current item (wiki page).
You could also use [[filename.pdf]] to link to a top-level file item.
Because pages and files will be treated the same way (it's all just
items with mimetypes then), moin will always link to the (implicit) show
action then. (this is why AttachFile's "view" is used currently)
That "show" action will then display the item and maybe also some
additional metadata about it.
> Is there any way to force a "get" instead of a "view" in the link?
No. At least not yet.
Maybe I could use the params section of [[target|desc|params]] to make
it possible, lets see...
> The use case is for someone like me who hates the acrobat pdf plugin,
> and doesn't want to have to click twice (once to get to the attachment
> page, and again to click the "Download" link) to download the file.
I see that it currently makes things maybe slightly more complicated
(having to do 2 clicks instead of one), but OTOH it will help making an
easy migration to what will be there in the future.
Cheers,
Thomas
More information about the Moin-user
mailing list