You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

projectdoc Toolbox

Shows how to use the Wiki Link Macro based on Remote Controls to alternate between two different views on a single document.

Type
Level of Experience

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 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.

Configuration 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.

Configure 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 change document.

list-of-changes:select=Identifier+, Name, Short Description, Description,Status|&list-of-changes:render-mode=*s&list-of-changes: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 Full View and add an appropriate tooltip.

Now we do the same for the toggle state. The next screenshot shows the request parameters we set in the first step configuring the Wiki Link Macro, the label and tooltip for the toggle state.

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.


Wrap Buttons

You probably do not want to print the link when exporting the page to PDF.

To do so wrap the Wiki Link Macro inside a Content Marker Macro.

Use the Pretend Being A space property to hide the content area in case the property is set to printer.

  • No labels