This macro is bundled with all the XWiki products by default.
Macro developed by the XWiki Development Team.
This macro cannot currently be downloaded separately.

Attach Macro

Adds a link to download an attachment in the wiki. Can also link to an external resource.

Usage

{attach:<link text>|file=<file>|document=<document>|title=<title>|rel=<rel>|id=<id>|fromIncludingDoc=}

Parameters definition

NameOptionalAllowed valuesDefault valuesDescription
link text (*)yesTextIf missing, the file name is used.The link text.
file (*)yesattachment name or an absolute urlIf missing, the link text is used.The target filename.
document (**)yesdocument name within the wikicurrent documentThe document to which the file is attached (allows linking to files attached to different pages).
titleyesTextIf missing, no title.The title attribute of the link. Often rendered as a tooltip.
relyesLink TypesIf missing, no rel.The rel attribute of the link. Specifies the relation from this document to the link.
idyes If missing, no id.The id attribute of the link.
fromIncludingDoc (**)yesEmpty
(just end with =)
 Fetch the attachment from the parent document that included the current document. This is useful for templates, for example.

(*) At least one of these parameters must be specified. Macro is ignored if both are missing.

(**) Use either document or fromIncludingDoc. Parameter fromIncludingDoc is ignored if both are specified.

Example

{attach:A simple text file|file=simple.txt|title=Download Simple Txt}

{attach: An image file on another page|file=gamesigns.jpg|document=ImageMacro|title=Download gamesigns.jpg}

Result

A simple text file
An image file on another page

Version 10.1 last modified by VincentMassol on 19/06/2008 at 21:57

Comments 0

No comments for this document

Attachments 1

Text
simple.txt 1.2
PostedBy: VincentMassol on 09/12/2007 (21 bytes )

Creator: melvng on 2007/02/12 22:43
This wiki is licensed under a Creative Commons license
1.4.1.10194