Wiki Documentation
WikiDocumentationBack to Snip <-- Previous Change | Next Change -->
| Diff Summary | |||||
|---|---|---|---|---|---|
| Title | |||||
| Date | 2007-05-27 17:52:27 | 2007-05-27 20:33:13 | |||
| Editor | Herbert Poul | Herbert Poul | |||
| Tags | |||||
| 2007-05-27 17:52:27 by Herbert Poul | 2007-05-27 20:33:13 by Herbert Poul | ||||
|---|---|---|---|---|---|
| 92 | 92 | ||||
| 93 | #### Parameters | 93 | #### Parameters | ||
| 94 | 94 | ||||
| 95 | - id (required): Id of the attachment | 95 | - id (required): Id of the attachment | ||
| 96 | - img tag parameters: width, height, alt, align wh | 96 | - img tag parameters: width, height, alt, align wh | ||
| > | ich are taken 1:1 as HTML parameters. | > | ich are taken 1:1 as HTML parameters. | ||
| t | t | 97 | |||
| 98 | |||||
| 99 | ### AttachmentList Macro | ||||
| 100 | |||||
| 101 | Creates a list of all attachments of the current w | ||||
| > | iki snip. | ||||
| 102 | |||||
| 103 | Example Usage: | ||||
| 104 | |||||
| 105 | {attachmentlist} | ||||
| 106 | |||||
| 107 | #### Parameters | ||||
| 108 | |||||
| 109 | - template: The template to use for rendering - De | ||||
| > | fault: sphene/sphwiki/macros/_attachment_list.html | ||||
| > | |||||
| 110 | |||||
| 111 | #### Template Variables | ||||
| 112 | |||||
| 113 | attachmentlist uses the generic view function obje | ||||
| > | ct_list but without pagination. | ||||
| 114 | |||||
| 115 | - attachment_list: Contains a list of all attachme | ||||
| > | nts. | ||||
| 116 | |||||
| 117 | |||||
| 118 | ### Attachment Macro | ||||
| 119 | |||||
| 120 | Displays a single attachment which is referenced b | ||||
| > | y it's id. | ||||
| 121 | |||||
| 122 | Example Usage: | ||||
| 123 | |||||
| 124 | {attachment id=5} | ||||
| 125 | |||||
| 126 | #### Parameters | ||||
| 127 | |||||
| 128 | - id (required): The id of the attachment to link | ||||
| > | to. | ||||
| 129 | - label: The label of the link - Default: the file | ||||
| > | name of the attachment | ||||
| 130 | - template: The template to use for rendering - De | ||||
| > | fault: sphene/sphwiki/macros/_attachment.html | ||||
| 131 | |||||
| 132 | #### Template Variables | ||||
| 133 | |||||
| 134 | - attachment: The attachment object | ||||
| 135 | - params: all parameters passed to the macro. If y | ||||
| > | ou create your own template you can for example us | ||||
| > | e {{ params.label }} to retrieve the value of the | ||||
| > | 'label' parameter in: {attachment id=5 label="Test | ||||
| > | ing"} | ||||
| 136 | |||||
Powered by Sphene Community Tools
