Create report table with column that surfaces the label called for while excluding the rest of the label list

  • 1
  • Question
  • Updated 2 years ago
  • (Edited)
Hi,

I'm attempting to build a report table using the reporting macro that has the following columns:
  • Page title
  • Last modified date
  • If the page has been soft-published, which is captured via the label "soft-published", show either the label "soft-published" and no other label, or show "yes"

I'm easily able to create the table, except for the label column. There, I'm able to list out all labels on the page, but not refine it to just the label I want.

Here's my current code:

</p><ac:macro ac:name="report-table">
  <ac:parameter ac:name="injected">true</ac:parameter>
  <ac:rich-text-body>
    <ac:macro ac:name="local-reporter">
      <ac:default-parameter>page:sorted descendents</ac:default-parameter>
      <ac:rich-text-body>
        <p>
          <ac:macro ac:name="content-filter">
            <ac:parameter ac:name="label">+soft-published</ac:parameter>
          </ac:macro>
        </p>
      </ac:rich-text-body>
    </ac:macro>
    <ac:macro ac:name="report-column">
      <ac:parameter ac:name="title">SOP</ac:parameter>
      <ac:parameter ac:name="injected">true</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:macro ac:name="report-info">
            <ac:parameter ac:name="link">true</ac:parameter>
            <ac:parameter ac:name="render">richtext</ac:parameter>
            <ac:default-parameter>content:title</ac:default-parameter>
          </ac:macro>
        </p>
      </ac:rich-text-body>
    </ac:macro>
    <ac:macro ac:name="report-column">
      <ac:parameter ac:name="title">Last Modified</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:macro ac:name="report-info">
            <ac:parameter ac:name="format">MM/dd/YYYY</ac:parameter>
            <ac:parameter ac:name="render">richtext</ac:parameter>
            <ac:default-parameter>content:modification date</ac:default-parameter>
          </ac:macro> </p>
      </ac:rich-text-body>
    </ac:macro>
    <ac:macro ac:name="report-column">
      <ac:parameter ac:name="title">Label</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:macro ac:name="report-info">
            <ac:parameter ac:name="render">richtext</ac:parameter>
            <ac:default-parameter>content:labels</ac:default-parameter>
          </ac:macro>
        </p>
      </ac:rich-text-body>
    </ac:macro>
  </ac:rich-text-body>
</ac:macro>

Thank you!
Cori
Photo of Cori Land

Cori Land

  • 2 Posts
  • 0 Reply Likes

Posted 2 years ago

  • 1

There are no replies.