---
title: "Create customized links with the Scaffolding Content Options macro"
canonical: "https://support.appfire.com/space/REPS/472916429/Create%20customized%20links%20with%20the%20Scaffolding%20Content%20Options%20macro"
format: markdown
---
> Macro (aura-html)

## Scenario

By default using Reporting on Scaffolding's [Content Options](https://appfire.atlassian.net/wiki/spaces/SCAFS/pages/477599859) macro will only display content in plain text but if you want the content to be hyperlinked, you may use the following recipe.

Reporting allows you to use [regular expressions](https://www.regular-expressions.info/) (regex) to look for specific patterns and get data that's relevant to you. Using regex we will grab metadata from the Content Options macro, specifically the page title and page ID.

- The page title is used as the label for the link
- Page ID is used as the link URL which has been embedded within the Report Link macro

Reporting contains a Text Supplier and Match Supplier which can be used to manipulate data from a Confluence instance.

In this recipe, the Text Supplier and Match Supplier are used for generating links for the Content Options macro.

## Result

![image](media://f1b32a4f-eb96-494d-af46-f35942aa2c5f)

## Recipe

| Apps | Scaffolding Forms & Templates for Confluence Data Center, Reporting for Confluence Data Center |
| --- | --- |
| Level | Advanced |
| Estimated time | 20 minutes |
| Macros | Report Info, Report Link, Report On |
| Suppliers | Match Supplier, Scaffold Data Supplier, Text Supplier |

## Storage format

You can copy and paste this code into the [Confluence Source Editor](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472907841):

```
<ac:structured-macro ac:macro-id="9a5cf569-5aa3-48d3-85a8-14148409703d" ac:name="report-on" ac:schema-version="1">
  <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
  <ac:parameter ac:name="">data:link&gt;join with " "&gt;find ".*?v.*?\\(.*?\\)"</ac:parameter>
  <ac:rich-text-body>
    <p class="auto-cursor-target">
      <br />
    </p>
    <ac:structured-macro ac:macro-id="2e0d52d0-3a01-4c6e-93b2-0dc95f49fa1b" ac:name="report-link" ac:schema-version="1">
      <ac:parameter ac:name="prefix">https://apps-demo.servicerocket.io/confluence-6.15.0/pages/viewpage.action?pageId=</ac:parameter>
      <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
      <ac:parameter ac:name="">match:value&gt;match "\\u0028(\\d*)\\u0029"&gt;group 1</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="6935a64b-831d-452f-9ddd-96d37688547b" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="">match:value&gt;match "page.(.*?)v.*?\\u0028(.*?)\\u0029"&gt;group 1</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p class="auto-cursor-target">
      <br />
    </p>
  </ac:rich-text-body>
</ac:structured-macro>

```

 

## Macro structure

You can recreate the example in the editor view:

![image](media://56b44d3e-4e5c-4e1c-8453-1248e2a1bc94)

## Steps

1. Add a Report On macro and set its **Key** parameter to `data:content_reporter_name>join with " ">find ".*?v.*?\\(.*?\\)`.
2. Within the Report On macro, add a Report Link macro with the following parameters:
  - Set the **Key** parameter to `match:value>match "\\u0028(\\d*)\\u0029">group 1`.
  - Set the **URL Prefix** parameter to* *`Confluence URL/pages/viewpage.action?pageId=`.
3. Within the Report Link macro, add a Report Info macro and set its **Key **parameter to `match:value>match "page.(.*?)v.*?\\u0028(.*?)\\u0029">group 1`.