Wiki Documentation
WikiDocumentationBack to Snip <-- Previous Change | Next Change -->
| Diff Summary | |||||
|---|---|---|---|---|---|
| Title | |||||
| Date | 2007-06-16 11:20:25 | 2007-06-17 01:26:43 | |||
| Editor | Herbert Poul | Herbert Poul | |||
| Tags | |||||
| 2007-06-16 11:20:25 by Herbert Poul | 2007-06-17 01:26:43 by Herbert Poul | ||||
|---|---|---|---|---|---|
| 150 | 150 | ||||
| 151 | - id (required): The id of the attachment to link | 151 | - id (required): The id of the attachment to link | ||
| > | to. | > | to. | ||
| 152 | - label: The label of the link - Default: the file | 152 | - label: The label of the link - Default: the file | ||
| > | name of the attachment | > | name of the attachment | ||
| 153 | - template: The template to use for rendering - De | 153 | - template: The template to use for rendering - De | ||
| > | fault: sphene/sphwiki/macros/_attachment.html | > | fault: sphene/sphwiki/macros/_attachment.html | ||
| 154 | 154 | ||||
| t | t | 155 | |||
| 156 | ### Redirect Macro | ||||
| 157 | |||||
| 158 | Redirects from one snip to another. This is useful | ||||
| > | to create aliases for wiki snips. | ||||
| 159 | |||||
| 160 | Example Usage: | ||||
| 161 | |||||
| 162 | {redirect snip=AnotherSnip} | ||||
| 163 | |||||
| 164 | 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. | ||||
| 165 | |||||
| 166 | #### Parameters | ||||
| 167 | |||||
| 168 | - snip (required): The target snip to which the us | ||||
| > | er should be redirected. | ||||
| 169 | |||||
| 170 | |||||
| 155 | #### Template Variables | 171 | #### Template Variables | ||
| 156 | 172 | ||||
| 157 | - attachment: The attachment object | 173 | - attachment: The attachment object | ||
| 158 | - params: all parameters passed to the macro. If y | 174 | - 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"} | ||
| 159 | 175 | ||||
Powered by Sphene Community Tools
