Is it possible to put an attached file at one page, and from another page link to that file? Example, we attach the file File.xml to the page Main.Files And then on the page Main.List we want to include a link to the File.xml file?
Hi Emil. Yes. The simplest way is a html tag. The attachment URL is effectively the name of a file in a subfolder of the name of the page with an action of "download". eg http://www.example.com:8180/xwiki/bin/download/MyWeb/MyPage/ MyAttachment.xml You could wrap the page and filename in a VelociMacro if you wanted to make it a bit portable for future use. Cheers, Mark On 17 Mar 2006, at 4:16 AM, [email protected] wrote:
Is it possible to put an attached file at one page, and from another page link to that file?
Example, we attach the file File.xml to the page Main.Files
And then on the page Main.List we want to include a link to the File.xml file?
-- You receive this message as a subscriber of the xwiki- [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/ wws
On 3/17/06, Mark Robinson <[email protected]> wrote:
Hi Emil.
Yes.
The simplest way is a html tag. The attachment URL is effectively the name of a file in a subfolder of the name of the page with an action of "download".
eg http://www.example.com:8180/xwiki/bin/download/MyWeb/MyPage/ MyAttachment.xml
You could wrap the page and filename in a VelociMacro if you wanted to make it a bit portable for future use.
Thanks Mark the best way i think is is to do : #set ($attDoc = $xwiki.getDocument("Main.Files")) #set ($urlAtt = $attDoc.getAttachmentURL("File.xml")) [My Attachment>$urlAtt] you can do a velocity macro with it to simplify the use. like this, if the urlFactory change, or you move your wiki to a portail (xwiki is JSR168),your link will always work. Jérémi -- Blog: http://www.jeremi.info LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724 Project Manager XWiki: http://www.xwiki.org skype: jeremi23 -- msn et gtalk : [email protected]
participants (3)
-
emil@mythicscape.com -
jeremi joslin -
Mark Robinson