NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{scrollabr:icons=false}
h4. {page-info:title}

{toc:minLevel=5}

h5. Attachment-data macro

The attachment-data macro allows the user to select or upload an attachment. If there are no attachments of the type specified, the Browse button looks on the local drive and allows attaching any file. If there are attachments of the type specified, the Browse button offers the list of those attachments.

The general form is:
{code}{attachment-data:Name|include=<regular expression>|exclude=<regular expression>}{code}

h6. Example One Attachment Data

{code}|| Image File: | {attachment-data:Image|include=.*gif,.*jpg} |
|| Image Display: | {report-image:data:Image > reference:value > attachment:download path} |{code}

|| Image File: | {attachment-data:Image|include=.*gif,.*jpg} |
|| Image Display: | {report-image:data:Image > reference:value > attachment:download path} |

h6. Example Two Attachment Data

{code}|| Image: | {hidden-data}
{attachment-data:Image|include=.*gif,.*jpg}
{hidden-data} {report-image:data:Image > reference:value > attachment:download path}  |{code}

|| Image: | {hidden-data}
{attachment-data:Image|include=.*gif,.*jpg}
{hidden-data} {report-image:data:Image > reference:value > attachment:download path}  |

h6. Example Three Attachment Data

{code}{attachment-data:Any}{code}

{attachment-data:Any}

h5. Attachment-options macro

The attachment-options macro generates a selectable list of attachments to the specified content, by default, the current page.

General form:{code}{attachment-options:content=[content name]|include=<regular expression>|exclude=<regular expression>}{code}

An example follows, with the markup followed by the rendered macro.

{code}{list-data:List of Image Options|type=check|multiple=true}
{attachment-options:content=Test of Attachment Data and Attachment Options|include=.*gif,.*jpg}
{attachment-options:content=Test of Attachment Data and Attachment Options|include=.*png}
{list-data}{code}

{list-data:List of Image Options|type=check|multiple=true}
{attachment-options:content=Test of Attachment Data and Attachment Options|include=.*gif,.*jpg}
{attachment-options:content=Test of Attachment Data and Attachment Options|include=.*png}
{list-data}

{scrollbar:icons=false}