| | | |
| - id (required): The id of the attachment to link | | - id (required): The id of the attachment to link |
| to. | | to. |
| - label: The label of the link - Default: the file | | - label: The label of the link - Default: the file |
| name of the attachment | | name of the attachment |
| - template: The template to use for rendering - De | | - template: The template to use for rendering - De |
| fault: sphene/sphwiki/macros/_attachment.html | | fault: sphene/sphwiki/macros/_attachment.html |
| | | |
t | | t |
|
| | | ### Redirect Macro
|
| | |
|
| | | Redirects from one snip to another. This is useful |
| | | to create aliases for wiki snips.
|
| | |
|
| | | Example Usage:
|
| | |
|
| | | {redirect snip=AnotherSnip}
|
| | |
|
| | | This does not create an HTTP redirect, but simply |
| | | loads the other snip. You can also create a chain |
| | | of redirects (Like RedirectSnip1 redirects to Redi |
| | | rectSnip2 which redirects to RedirectSnip3 .. No i |
| | | dea why this would be of any use.. but it is allow |
| | | ed anyway) - If a loop is detected it breaks the l |
| | | oop at displays the snip the user has requested.
|
| | |
|
| | | #### Parameters
|
| | |
|
| | | - snip (required): The target snip to which the us |
| | | er should be redirected.
|
| | |
|
| | |
|
| #### Template Variables | | #### Template Variables |
| | | |
| - attachment: The attachment object | | - attachment: The attachment object |
| - params: all parameters passed to the macro. If y | | - params: all parameters passed to the macro. If y |
| ou create your own template you can for example us | | ou create your own template you can for example us |
| e {{ params.label }} to retrieve the value of the | | e {{ params.label }} to retrieve the value of the |
| 'label' parameter in: \{attachment id=5 label="Tes | | 'label' parameter in: \{attachment id=5 label="Tes |
| ting"} | | ting"} |
| | | |