Extracting Scaffolding Data from Children Pages
Scenario
This recipe is relevant for page structures containing Parent page to Children page to Descendent:
In the sub-child page, a table can be wrapped inside Scaffolding's Table Data macro.
For example:
It’s possible to configure the Text Data macro inside the table to get user input.
This recipe shows how to extract text from the Text Data macro (nested inside the Table Data macro) and display it as a report on a different page.
This recipe can also be used with Live Templates. See this in action at our Demo site!
Result
Recipe
Ingredients
Apps | |
---|---|
Platform | N/A |
Level | INTERMEDIATE |
Estimated time | 20 minutes ⏱ |
Macros | |
Suppliers |
Storage format
Macro structure
You can recreate the example in the editor view:
Steps
- Add a report-table macro.
- Add the expanding-reporter macro within a report-table macro and specify the following:
- Key:data:tableData
- As:exr
- Match All:true
Add a content-reporter macro within expanding-reporter macro and specify the following:
- Spaces:
@self
- Types:page
- Scope:Cafe Rockettoria Projects > descendents
- Match All Criteria:true
- Add a report-column macro within the report-table macro and specify the following:
- Title:Coffee Machine Details
- Add a report-info macro within the new report-column macro and specify Key as expanded:exr>data:textData
- Add another report-column macro within the report-table macro and specify the following:
- Title:Remarks
- Add text-data macro within the report-column macro above and specify Field Name as "remarks".
- Save the page.
- Output should be as below. In this example since the data is extracted from TextData - the content whether its formatted as a paragraph or header will follow