[Moin-user] Force "get" action instead of "view" action in a link?

Martin Spacek mspacek at mm.st
Tue Nov 6 04:08:01 EST 2007

Martin Spacek wrote:
> Thomas Waldmann wrote:
>>> 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...
> Hi Thomas,
> That would be great. Is there already a params section for links? If so, 
> what kind of parameters can you pass to it?

Until there's some better way of overriding the default 'view' 
behaviour, I found I could restore the 'get' behaviour with a simple 
change. In 1.6.0beta1 in /formatter/text_html.py, in the 
Formatter.attachment_link() method around line 641, I changed:

target = AttachFile.getAttachUrl(pagename, fname, self.request, do='view')


target = AttachFile.getAttachUrl(pagename, fname, self.request, do='go')

Now, clicking on an attachment link downloads directly instead of taking 
me to the attachment page with the download link.



More information about the Moin-user mailing list