Versions Compared

Key

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

...

Document Properties Marker
doctypetopic
overridefalse


true

Short DescriptionShows how to use the Wiki Link Macro based on Remote Controls to alternate between two different views on a single document.
NameToggle Views
Short Name
Parent
Parent Property
property-nameName
hide
Audience

Name List
doctyperole
render-no-hits-as-blanktrue
render-list-as-comma-separated-valuestrue
namesTemplate Author, Documentation Architect, Author
property-restrict-value-rangetrue
propertyAudience

empty-as-none


Subject
Name List
doctypesubject
propertySubject

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

Tags

Tag List
namesWiki Link, Confluence, projectdoc Toolbox, Remote Controls
propertyTags

hide
Flagshide
Iteration

Iteration
valuefilled

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
namesProficient
propertyLevel of Experience


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

Sort Keyhide


...

Section
show-titlefalse
titleDescription

Remote controls allow to override macro parameters with HTTP request parameters. This way a view on a document can be altered. For instance a release notes document could show changes in a condensed form. By providing a link to override the parameters of the macro displaying the changes, the view could expand the information on each change. Since version 4.5 of the projectdoc Toolbox for Confluence the Wiki Link Macro allows to toggle between the two states.

This tip shows how to configure the Display Table Macro and Wiki Link Macro to create two views on a document.

...

Section
titleConfiguration Display Table

To make the Display Table Macro ready to be remote controlled, the Identifier parameter needs to be set.

You can also use the Identifier Classes parameter in case you need to control a selection of macros in a single action. 

Configure your query with the Select, Where and Sort By parameter according to your use case. For our example we only just select the macro documents tagged with Remote Controller of this space.


Section
titleConfigure Wiki Link Macro

The Wiki Link Macro allows to add Remote Controls with the Request Parameters parameter.

The following controls alter the selected information, switch to the section render mode, and render the section title as link to the macro document.

Code Block
list-of-macros:select=Name, Short Description, Description,Tags|&
list-of-macros:render-mode=*s&
list-of-macros:render-heading-as-link=true

Since the Wiki Link Macro refers per default to the current document, when clicking the link, the view will be expanded to the section view. Therefore we set the label of the link to Details View and add an appropriate tooltip.

Now we do the same for the toggle state. Besides the label and tooltp tooltip for the toggle state the next screenshot also shows the request parameters we set before.

By specifying a Request Toggle Label and by providing Request Parameters the Wiki Link Macro provides a toggle mode.

You may want to deselect the styling options, since these options are not relevant for self-referencing links.


...

Section
titleLive Example

Here is the live example showing the macros provided by the projectdoc Toolbox.

Example Box
titleExample with Toggle Link


Content Marker
required-space-properties!pretend-being-a=printer
idlist-of-macros-buttons

Wiki Link
request-parameterslist-of-macros:select=Name, Short Description, Description,Properties,Tags|&list-of-macros:render-mode=*s&list-of-macros:render-heading-as-link=true
render-space-ref-cssfalse
request-toggle-labelOverview
tooltipRender a details of the macros.
labelDetails View
request-toggle-tooltipRender an overview over the macros of the projectdoc Toolbox..
render-no-docs-cssfalse

Display Table
doctypeapp-macro, macro
render-modedefinition
selectName, Short Description
render-idlist-of-macros
where$<Tags>=[Remote Controller]




Section
ignore-template-buttonstrue
titleSubordinate Topics


Hide From Reader

Create from template
blueprintModuleCompleteKeyde.smartics.atlassian.confluence.smartics-projectdoc-confluence-space-core:projectdoc-blueprint-doctype-topic
buttonLabelCreate Topic

Display Table
doctypetopic
render-no-hits-as-blanktrue
render-modedefinition
selectName, Short Description
restrict-to-immediate-childrentrue
sort-bySort Key, Name

...

Section
titleResources


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


...