Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Live template
templateTypetemplate
templateOption{"label":"Use Case livetemplate cloud ready","value":"979936585","templateType":"template"}
templateTypeOption{"label":"Confluence template/blueprint","value":"template"}
templateId979936585
excerptScenario This recipe will help you to extract certain values from page titles and then show them in different columns using the Text Supplier macro. In this example, we use the Page Supplier and Text Supplier macros to extract a number from page titles. Result Recipe Apps Reporting for Confluence Server & Data Center, Linking for Confluence Server Level Easy Estimated time 10 minutes Macros Local Reporter, Report Column, Report Info, Report Table Suppliers Page Supplier, Text Supplier Storage format You can copy and paste this code into the Confluence Source Editor : Create <p>Create a Child Page: Child : <ac:structured-macro ac:macro-id="164092d7-53b7-498c-986f-16b720d77dea" ac:name="add-page" ac:schema-version="1"> <ac:parameter ac:name="name">Child Page %child-counter:next > number:000% Create Child Page List of Children Pages: page:children page:title Page Title true page:title Page Number (Extracted from Page Title) page:title>text:last 3>text:as number &gt; number:000%</ac:parameter> <ac:parameter ac:name="linkText">Create Child Page</ac:parameter> </ac:structured-macro> </p> <hr /> <p>List of Children Pages:</p> <ac:structured-macro ac:macro-id="ac02fa1e-1f5c-48ed-a2de-cb2cb25f3520" ac:name="report-table" ac:schema-version="1"> <ac:rich-text-body> <ac:structured-macro ac:macro-id="77342fca-1f4e-4496-b49c-a07c622b1dd7" ac:name="local-reporter" ac:schema-version="1"> <ac:parameter ac:name="">page:children</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="7ae77974-2eff-4c97-8cd3-ac9634aad176" ac:name="text-sort" ac:schema-version="1"> <ac:parameter ac:name="">page:title</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="1c053104-056e-444c-8bb6-f8eaac8a51e7" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Page Title</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="ea25a2f0-ffe4-4a47-8085-f7f3ede8bf93" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="link">true</ac:parameter> <ac:parameter ac:name="">page:title</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="22b23480-5cbe-4441-907c-fe1fc6a00bae" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Page Number (Extracted from Page Title)</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="f12c0810-c0ce-4495-84c0-d29b140a80bb" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">page:title&gt;text:last 3&gt;text:as number</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> Macro structure You can recreate the example in the editor view: Steps Create a page and child page titles that have a format of "Child Page 000". Add a Report Table macro and within add a  Local Reporter macro. Set the Local Reporter macro's  Key parameter to page:children . Inside the  Local Reporter macro, add a Text Sort macro and set the Key to page:title . Below the Local Reporter macro, add two Report Column macros. Set the first Report Column macro's Title to " Page Title " and add a Report Info macro within it. Set the Report Info macro's Key to page:title and Link to item to True . Set the second Report Column macro's  Title to " Page Number " and add a Report Info macro within it. Set the Report Info macro's Key to page:title>text:last 3>text:as number . Optionally, you can use a Add Page macro from Linking for Confluence to create the Children pages with a running number. Insert an Add Page macro to the top of the page and and set the following: Name to Child Page %child-counter:next > number:000% Link Text to Create a Child Page Line-by-Line Explanation N/A
fieldGroupKeys{"6aqnjkbqoz":["net.customware.confluence.plugin.scaffolding__6aqnjkbqoz__data_0_1t6ivdakxv2072nt53w7"]}