Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section


Column


Document Properties Marker
overridefalse


Short DescriptionUsing document and space properties as variables in the projectdoc Toolbox for Confluence.
Doctypetopichide
NameUsing Variables
Short Name
Parent
Parent Property
property-nameName
hide
Audience
Name List
doctyperole
render-no-hits-as-blanktrue
property-restrict-value-rangetrue
propertyAudience
empty-as-nonetrue

Subject
Name List
doctypesubject
propertySubject

Categories
Name List
doctypecategory
property-restrict-value-rangetrue
propertyCategories

Tags
Tag List
propertyTags

Flagsprojectdoc Toolbox, Confluence, Variables, Properties, Document, Spacehide
Iteration

Iteration
valuefilledfocused

hide
Type

Name List
doctypetopic-type
render-no-hits-as-blanktrue
namesTip
property-restrict-value-rangetrue
propertyType


Level of Experience

Name List
doctypeexperience-level
render-no-hits-as-blanktrue
namesAdvanced Beginner
propertyLevel of Experience


Expected Duration10 min
Sponsors
Name List
doctypestakeholder
render-no-hits-as-blanktrue
propertySponsors

Sort Keyhide
enable-heading-numberstruehide




Column


Panel
titleContents

Table of Contents
outlinetrue
indent10px
stylenone



...

Section
titleUsing Properties

A property can be used in a number of ways. We will focus on document properties for our examples.

Section
titleProperty Reference

A property may simply be referenced with a Display Document Property Macro. Whenever the value of the property is changed, the value will change in the page using this macro is rendered.Macro editor view to render a property value.

Note Box
titleAllowed as Property Value

The macro can also be used as a property values, since a page gets updated whenever a referenced page is.

There is a number of macros that allows user to render property values.

Tour
header-translationsName=Macro
replace-title-with-nametrue



Authors may also choose to render properties of a list of documents in tabular form using the Tour Macro. Each property is rendered in a column or multiple properties may be rendered in a table cell using a template.


Section
titleControl Rendering Section

With document and space properties authors can control whether or not to render a section (using the Section Macro) or a region (using the Content Marker Macro) on a page.

Section is shown if the property with name 'Type' has a value of 'Epic'.

Authors may also check for a property for any value (i.e. require the property not to be empty).

Section is shown if the property with name 'Authorized by' is not an empty value.

The use case for the above example would be to show the section only if the document is authorized by a person. The authorization is provided by adding the name of the person who give the authorization.

projectdoc-box-caution
titleNot a Workflow with role-based protection!

This use case does not protect the authorization process. Any user with write access to a page may alter any property (remove it or change value).



projectdoc-section
titleList Documents

Document properties can be used to control which documents are shown in dynamic list. The Display List Macro and Display Table Macro provide a parameter named Where to specify queries. A Where clause looks like this:

Where clause to filter on documents.

The following shows the same query but with exact match. While the query above will also match Types types like "Great Tip" and "Lousy Tip", the query below matches only for "Tip".

Exact match query.

Once the value of a property changes, the query will update the results the next time the page with the dynamic list is rendered.

projectdoc-box-tip

For date values there is a normalized property to make it easier to match values despite of the formatting. So instead of "Creation Date" authors may want to use "Creation Date§".

Sample with normalized date property value.Image Added

In case dates or other property types need to be compared, check out Search Functions on Search Tips or read the tip Search Functions.




projectdoc-section
titleUpdating Property Values

Property values may be updated by editing the value in the properties table inside the Document Properties Marker Macro and saving it.

An alternative way of changing values is to use the Web API of the projectdoc Toolbox which is provided by the free Web API Extension. This way a property can be changed by a simple simple REST call.

Changing values with this REST API can also be made quite simple from within an author's web browser by the use of bookmarklets. Use the free Bookmarklets Extension to get started with defining your own bookmarklets.

...

Section
titleReferences


Tour
render-no-hits-as-blanktrue
render-as-definition-listtrue
marker-column-property-nameTitle
replace-title-with-nametrue


TitleShort Description





Section
titleResources

More information on related topics.

Tour
render-no-hits-as-blanktrue
render-as-definition-listtrue
marker-column-property-nameTitle
replace-title-with-nametrue





Piwik Set Multiple Custom Variables


NameValue
Departmentprojectdoc
Categoryprojectdoc-tip
Typehowto


...