Content Column |
---|
| Content Block |
---|
| Document Properties Marker |
---|
| Short Description | Compare the Page Properties Macro / Page Properties Report Macro with the Document Properties Marker Macro / Display Table Macro | |
---|
Doctype | test-case | hide |
---|
Name | Working with Properties | |
---|
Parent | Parent Property |
---|
property | Parent |
---|
property-name | Name |
---|
|
| |
---|
Audience | Name List |
---|
doctype | role |
---|
property | Audience |
---|
|
| |
---|
Subject | Name List |
---|
doctype | subject |
---|
property | Subject |
---|
|
| |
---|
Categories | Name List |
---|
doctype | category |
---|
property | Categories |
---|
|
| |
---|
Tags | | |
---|
Iteration | | hide |
---|
Source | | |
---|
Result | | |
---|
Sort Key | 00001000 | hide |
---|
Teaser | | hide |
---|
|
Users employ the Page Property Report Macro to query pages with properties and display them in a table. In order to work the Confluence pages to select have to contain one or more instances of the Page Properties Macro. In the Page Properties Macro users define the properties of the page as key-value pairs in a table. Users of the projectdoc Toolbox use the Display Table Macro to define the queries instead of the Page Property Report Macro. The Document Properties Marker Macro replaces the Page Properties Macro to define the document properties. Note Box |
---|
Confluence calls the properties page properties, while the projectdoc Toolbox uses the name document properties. Section |
---|
Column |
---|
| Panel |
---|
title | projectdoc Toolbox Macros |
---|
| |
|
|
|
So let's first have a look at the differences in specifying properties. Compare Defining PropertiesConfluence Page Property Report MacroThe sample used in this demo: Topic with Page Properties 1. Here is a screenshot from the Page Properties Macro:
You may have several sets of properties identified by a unique ID (which is optional). The table with the properties is straight forward. First column contains the name, the second column the value. Document Properties Marker MacroThe sample used in this demo: Topic with Document Properties 1. Here is a screenshot from the Document Properties Marker Macro:
You may only have one definition of properties per document. Instead of two columns, you have three. Besides the name and the value for the property there is a third column for Property Controls. A very handy control is hide that allows users to prevent a line in the table from rendering. The macro configuration has the following parameters:
Besides the already mentioned identifier users decided whether to show the table as a whole or not at all. The macro configuration has the following parameters:
The macro also allows to hide the whole table. it also allows to render the properties as a definition list and to extract a special property called Short Description. This allows to render the properties more compact. The table with the properties is rendered on the page defining the properties as follows.
The table with the properties is rendered on the page defining the properties as follows. Section |
---|
Column |
---|
| Definition List |
Column |
---|
Table
|
|
So this is the end of defining properties for a Confluence page. Now have a look on how to query from pages! Confluence Page Property Report MacroThe macro allows you to define a query based on a predefined set of properties.
The selection process is elegant, supporting the user very nicely to select on the properties. projectdoc Display Table MacroThe macro allows to define a query based on any property.
The query has to be specified with a simple text field. The user is not as well guided through the selection process as with the Confluence macro. The benefit is that the constraint can be based on any property the user specified as a property. Furthermore the query can be defined using AND, OR, NOT and brackets. It is an enhanced version of a Lucene query. To select the properties to be shown in the table for the result set the process is straight forward:
To select the properties to be shown in the table for the result set the process is straight forward:
So here is a live result of the Page Property Report Macro: Page properties report |
---|
firstcolumn | Name |
---|
headings | Categories, Iteration, Property 1 |
---|
cql | label = "confluence" and space = currentSpace() |
---|
|
So here is a live result of the Display Table Macro: Display Table |
---|
doctype | test-data |
---|
select | Name, Categories, Iteration, Property 1 |
---|
|
More Use CasesThe Page Property macros provide some features that are don't provided by the macros from the projectdoc Toolbox. For instance you may define multiple sets of properties and identify them by an ID. We expect readers to know about the features of the Confluence macros quite well. Therefore we do not show them here and instead show features of the projectdoc Toolbox macros that are not supported by Confluence natively. Panel |
---|
title | Name may be any Column |
---|
| Macro Configuration
Rendered Result Display Table |
---|
doctype | test-data |
---|
select | Categories, Iteration, Name, Property 1 |
---|
|
|
Panel |
---|
title | No need to have Name as a Column |
---|
| Macro Configuration
Rendered Result Display Table |
---|
doctype | test-data |
---|
select | Property 1+, Categories, Iteration |
---|
|
|
Panel |
---|
title | Constrain on ANY Property |
---|
| Macro Configuration Rendered Result Display Table |
---|
doctype | test-data |
---|
select | Property 1+, Categories, Iteration |
---|
where | $[Property 1]="Value 1" |
---|
|
|
Panel |
---|
title | Select Properties and Sections |
---|
| Macro Configuration
Rendered Result Display Table |
---|
doctype | test-data |
---|
select | Name, Description, Section 1 |
---|
|
|
Panel |
---|
title | Show the Tables vertically |
---|
| Macro Configuration
Rendered Result Display Table |
---|
doctype | test-data |
---|
render-mode | 2 |
---|
select | Name, Iteration, Description, Section 1 |
---|
|
|
Panel |
---|
| Macro Configuration
Rendered Result Display Table |
---|
doctype | test-data |
---|
select | Name, Property 1 |
---|
header-translations | Property 1=MY PROPERTY |
---|
|
|
Panel |
---|
title | 2-Column Results as Definition List |
---|
| Macro Configuration
Rendered Result Display Table |
---|
doctype | test-data |
---|
render-mode | definition |
---|
select | Name, Property 1 |
---|
|
|
Panel |
---|
title | 2-Column Results as List |
---|
| Macro Configuration
Rendered Result Display Table |
---|
doctype | test-data |
---|
render-mode | numbered |
---|
select | Name, Short Description |
---|
|
|
Panel |
---|
title | Constrain on ANY Property |
---|
| Macro Configuration
Rendered Result Display Table |
---|
doctype | test-data |
---|
select | Name, Short Description, Iteration |
---|
where | ($[Property 1]="Value 1" OR Categories = "Cat 2") NOT Iteration=Facade |
---|
|
The complete where clause looks like this: Code Block |
---|
| ($[Property 1]="Value 1" OR Categories = "Cat 2") NOT Iteration=Facade |
|
SummaryConfluence calls the properties page properties, while the projectdoc Toolbox uses the name document properties. Transclusion |
---|
document | PDAC1:Page Properties and Document Properties |
---|
ids | AbstractSummary |
---|
| |
Macro ParametersHere are screenshots to compare the configuration options of the two query macros visually. For detailed information please refer to
For detailed information please refer to
Section |
---|
title | Description Section |
---|
required-permissions | write-access |
---|
title | Notes |
---|
| |
|
|
|