Going Stellar

Home/Confluence storage format reference

Confluence storage format

details and detailssummary macros in storage format

The details macro marks a table on a page as a set of properties, and the detailssummary macro lists those properties from every page that carries a given label. The Cloud documentation calls them the content properties macro and the content properties report macro.

Storage format

<ac:structured-macro ac:name="details"><ac:rich-text-body><table><tbody><tr><th>Owner</th><td>Team A</td></tr></tbody></table></ac:rich-text-body></ac:structured-macro>
<ac:structured-macro ac:name="detailssummary"><ac:parameter ac:name="cql">label = demo</ac:parameter></ac:structured-macro>

In the editor

HowNote
Use the + toolbar button or type / and pick the content properties macro, then build a two-column table in its bodyPer the Atlassian documentation.
Type /contentpropertiesreport and enter the label to report onPer the Atlassian documentation.

As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

<ac:structured-macro ac:name="details"><ac:rich-text-body><table><tbody><tr><th>Owner</th><td>Team A</td></tr></tbody></table></ac:rich-text-body></ac:structured-macro>
{
 "type": "doc",
 "content": [
  {
   "type": "bodiedExtension",
   "attrs": {
    "extensionType": "com.atlassian.confluence.macro.core",
    "extensionKey": "details",
    "parameters": {
     "macroParams": {
      "_parentId": {
       "value": "<page id>"
      }
     },
     "macroMetadata": {
      "macroId": {
       "value": "<id>"
      },
      "schemaVersion": {
       "value": "1"
      },
      "title": "Page Properties"
     }
    }
   },
   "content": [
    {
     "type": "table",
     "attrs": {
      "__autoSize": true
     },
     "content": [
      {
       "type": "tableRow",
       "content": [
        {
         "type": "tableHeader",
         "attrs": {
          "colspan": 1,
          "rowspan": 1
         },
         "content": [
          {
           "type": "paragraph",
           "content": [
            {
             "text": "Owner",
             "type": "text"
            }
           ]
          }
         ]
        },
        {
         "type": "tableCell",
         "attrs": {
          "colspan": 1,
          "rowspan": 1
         },
         "content": [
          {
           "type": "paragraph",
           "content": [
            {
             "text": "Team A",
             "type": "text"
            }
           ]
          }
         ]
        }
       ]
      }
     ]
    }
   ]
  }
 ],
 "version": 1
}

Examples

Storage format sent

<ac:structured-macro ac:name="details"><ac:rich-text-body><table><tbody><tr><th>Owner</th><td>Team A</td></tr></tbody></table></ac:rich-text-body></ac:structured-macro>

Turns a two-column table into page properties, with the key in the left cell and the value in the right cell. The report reads the left column as the column heading.

Rendered view (HTML)

<div class="plugin-tabmeta-details conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="details"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Owner</th><td class="confluenceTd">Team A</td></tr></tbody></table></div></div>

Storage format after the round trip through ADF

<ac:structured-macro ac:name="details" ac:schema-version="1" ac:macro-id="<id>"><ac:rich-text-body><table data-layout="default"><tbody><tr><th><p>Owner</p></th><td><p>Team A</p></td></tr></tbody></table></ac:rich-text-body></ac:structured-macro>

Sent to Confluence Cloud on .

Storage format sent

<ac:structured-macro ac:name="detailssummary"><ac:parameter ac:name="cql">label = demo</ac:parameter></ac:structured-macro>

Reports the properties of every page selected by a CQL expression. The view of a page with no matching pages is an empty table with the caption 'Generating page properties report...'.

Rendered view (HTML)

<div class="table-wrap conf-macro output-block" data-hasbody="false" data-macro-id="<id>" data-macro-name="detailssummary"><table class="aui metadata-summary-macro null" data-cql="label = demo" data-first-column-heading="Title" data-count-comments="false" data-count-likes="false" data-total-pages="0" data-page-size="30" data-sort-by="null" data-reverse-sort="false" data-blueprint-present="false" data-current-space-key="SD" data-current-content-id="<page id>"><caption>Generating page properties report...</caption><thead> </thead><tbody> </tbody></table></div>

Storage format after the round trip through ADF

<ac:structured-macro ac:name="detailssummary" ac:schema-version="3" data-layout="full-width" ac:macro-id="<id>"><ac:parameter ac:name="cql">label = demo</ac:parameter></ac:structured-macro>

Sent to Confluence Cloud on .

Storage format sent

<table><tbody><tr><th>H</th><td>row header column</td></tr></tbody></table>

A table with a header cell on the left of each row. The documentation says the properties table can have a header column or a header row; this probe ran the vertical shape without the macro.

Rendered view (HTML)

<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">H</th><td class="confluenceTd">row header column</td></tr></tbody></table></div>

Storage format after the round trip through ADF

<table data-layout="default"><tbody><tr><th><p>H</p></th><td><p>row header column</p></td></tr></tbody></table>

Sent to Confluence Cloud on .

Storage format sent

<table><tbody><tr><th>Table Heading Cell 1</th><th>Table Heading Cell 2</th></tr><tr><td>Normal Cell 1</td><td>Normal Cell 2</td></tr></tbody></table>

A table with one header row and one value row, the horizontal shape the documentation describes. The probe ran it without the macro to show how the plain table converts.

Rendered view (HTML)

<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Table Heading Cell 1</th><th class="confluenceTh">Table Heading Cell 2</th></tr><tr><td class="confluenceTd">Normal Cell 1</td><td class="confluenceTd">Normal Cell 2</td></tr></tbody></table></div>

Storage format after the round trip through ADF

<table data-layout="default"><tbody><tr><th><p>Table Heading Cell 1</p></th><th><p>Table Heading Cell 2</p></th></tr><tr><td><p>Normal Cell 1</p></td><td><p>Normal Cell 2</p></td></tr></tbody></table>

Sent to Confluence Cloud on .

What changes in conversion

  • details survives as a bodiedExtension node (extensionKey details, title 'Page Properties'). Its table is rewritten on the way back: data-layout="default" is added and every cell's text is wrapped in a paragraph.
  • detailssummary keeps its cql parameter and its schema-version of 3. After the ADF round trip it carries data-layout="full-width".
  • The macro names stay details and detailssummary in storage even though the Cloud documentation uses the labels content properties and content properties report.

Pitfalls

  • The report only finds a page if the page carries the label named in the report. The probe had no labelled pages, so the report view shows no rows.
  • The documentation says macros cannot be used in the left column, and that a table can have a header row or a header column but not both. Neither rule was tested.
  • The optional content properties ID and the Hidden setting are described in the documentation, but their storage parameter names were not probed.

Questions and answers

Does the table inside the macro keep its header cells?

Yes. The th cells came back as th cells with their text wrapped in paragraphs.

Sources

  1. What are macros? (Atlassian Support, Confluence Cloud)
  2. Insert the content properties macro (Atlassian Support)
  3. Insert the content properties report macro (Atlassian Support)

Markdown version · All storage format pages