Displays a list of attachments on a given page. For more information see Displaying a List of Attachments.

コー​​ドの例

次の例は、Confluence ページの基礎となるマークアップを編集したい上級ユーザーのために提供します。

マクロ名: attachments

マクロ本文: なし。

パラメーター名必須既定パラメーターの説明と指定可能な値
oldいいえfalse

利用可能な値:

  • false - Displays only the latest version of each attachment.
  • true – Displays all versions of each attachment, including the old versions.
patternsいいえ(なし)

sortByいいえdate

利用可能な値:

  • date
  • size
  • name
  • createdate
pageいいえThe page on which the macro exists.Page name, used to display attachments from another page.
sortOrderいいえ

The default sort order is determined by the sortBy type:

  • Reverse chronological for 'date'.
  • Largest to smallest for 'size'.
  • Alphabetical for 'name'.

利用可能な値:

  • ascending
  • descending
labelsいいえ(なし)A comma-separated list of labels. Confluence will show only attachments that have all the labels specified. (The match is an AND, not an OR.)
uploadいいえfalseDetermines whether the list of attachments will include options allowing users to browse for, and attach, new files.
preview
いいえtrue

Determines whether a preview of the attached file appears when the item is expanded.

保存形式の例

<ac:structured-macro ac:name="attachments">
  <ac:parameter ac:name="old">false</ac:parameter>
  <ac:parameter ac:name="patterns">.*png,.*jpg</ac:parameter>
  <ac:parameter ac:name="sortBy">name</ac:parameter>
  <ac:parameter ac:name="page">
    <ac:link>
      <ri:page ri:content-title="My page about chocolate"/>
    </ac:link>
  </ac:parameter>
  <ac:parameter ac:name="sortOrder">descending</ac:parameter>
  <ac:parameter ac:name="labels">chocolate,cookies</ac:parameter>
  <ac:parameter ac:name="upload">false</ac:parameter>
</ac:structured-macro>

Wiki マークアップの例

{attachments:old=false|patterns=.*png,.*jpg|sortby=name|page=Mypage about chocolate|sortorder=descending|labels=chocolate,cookies|upload=false|preview=false}