Page tree

Versions Compared

Key

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

Documentation for the ConfiDoc Plugin for Confluence

 

Info

See also tutorials for easy to follow examples on how to use ConfiDoc in different scenarios

 

 


TableView: 
   confidoc-table


ListView:
   confidoc-list


CardView:
   confidoc-card

 

 


The confidoc-table, confidoc-list, and confidoc-card macros are used to present the REST service content (or RSS, CSV, XML) as a table, list (WYSIWYG), or card, each with filtering and data sorting/ordering.

Name of the serviceserviceIdServices are defined by the Confluence administrator using the plugin's configuration screen
Root elementrootApply additional filters to the returned JSON data using field names as inputs
Sorting/OrderingsortSee examples below
FilterfilterApply a filter on returned data; see examples below
Cache resources locallyuseCacheRequest results can be stored locally in the Confluence cache in order to improve page loading times and to reduce the number of requests to external servers; default local cache duration is 30 minutes 
Show service configuration dialogenableLookupUsers will be able to configure their own parameters for a configured service request
Define configuration parameterslookupLabelsDefine labels for the configuration dialog using key-value pairs, separated by "&" (as in URL notation), where key is the parameter name, and value is the text to be used as the label
Caption for configuration buttonlookupBtnLabelProvide a helpful pointer under the configuration dialog submit button
Set HTML element IDelementIdUseful, when you want to have a predictable and constant element id in HTML for generated content. Important: "_viewport" will be added to the name

ConfiDoc Field

confidoc-field

This macro defines a field to display returned data within the ConfiDoc TableView or ListView macros.

Field namenameThe name of the field in the returned data to be displayed by the TableView or ListView macros
Field labellabelThe label for the field to be displayed inside the table or list
Field typetypeChoose the field type from these supported formats:
  • Link
  • Date
  • Number
  • Image
  • 'as-is' (blank: the value will be shown without transformation)
Input formatinputFormatDefine the format in a returned data field in order to reformat using Output format (below), for example, to transform returned date values into more readable form
Output formatoutputFormatDefine the transformation rules for Output to be applied to data in the Input format (above)
CSScssDefine CSS rules to be applied on returned data in a rendered field
Access controlrestrictionsControl access to this field with a comma-separated list of group- or user names; leave blank if there are no restrictions
Set HTML element IDelementIdUseful, when you want to have a predictable and constant element id in HTML for generated content

ConfiDoc Excerpt

confidoc-excerpt

Use this macro to include in the Confluence page the HTML or binary content (such as images) from an external webserver

Name of the serviceserviceIdServices are defined by Confluence administrators with the ConfiDoc plugin configuration
SelectorrootA CSS-like selector, but limited to a form: element attribute="value".

To select elements by name, give the element's name; for example: div will select all the divs in the page

To select all div elements in the page with the myclass class name, use: div class="myclass"

Download and cache resources locallydownloadResources

You can:

  • leave links to external resources "as is"
  • download external resources (such as images) to the Confluence server and adds them as attachments to the page
  • proxy external resources though local proxy
Cache resources locallyuseCacheStore requests locally in the Confluence cache to improve page-loading times and to reduce the number of requests to external servers  (default cache duration is 30 minutes)
Content TypecontentTypeForce ConfiDoc to use the given content type
Custom CSS stylescssCustom CSS rules to apply on the rendered element
Include astype

 This option provides a way to control how the macro outputs the returned data.  Available types include: 

  • Link
  • Date
  • Number
  • Image
  • 'as-is' (blank: the value will be shown without transformation)
Show service configuration dialogenableLookupUsers will be able to configure their own parameters for a configured service request
Define configuration parameterslookupLabelsDefine labels for the configuration dialog using key-value pairs, separated by "&" (as in URL notation), where key is the parameter name, and value is the text to be used as the label
Caption for configuration buttonlookupBtnLabelProvide a helpful pointer under the configuration dialog submit button
CaptiondownloadBtnLabelWhen the content to be loaded is binary, a download link will be rendered; this parameter sets the label on that link
Set HTML element IDelementIdUseful, when you want to have a predictable and constant element id in HTML for generated content. Important: "_viewport" will be added to the name

ConfiDoc Excerpt Anchor

confidoc-excerpt-anchor

This macro helps you to group content elements inside a block and easily reference this block later with the ConfiDoc Excerpt macro

Alphanumeric AnchorID (no spaces)anchorIdReference this block from the ConfiDoc Excerpt macro using the ''div id="AnchorID"'' selector

ConfiDoc Show-For (IF) Macro

confidoc-show-for

This macro displays included content only for given users and/or groups

Content is visible only torestrictionsA comma-separated list of group names and/or user names

ConfiDoc Globals

confidoc-globals

This macro provides a convenient way to store and display global variables in Confluence

Variable namevarsVariable name

CSS Rules for ConfiDoc Fields

confidoc-field-css

This is a helper macro to format fields visually based on their values

Field value or expressionconditionUse values or expressions in order to match returned data much as you would for filters; ConfiDoc filters are very similar in functionality to ConfiForms Filters (also developed by Vertuna LLC)
Field namefieldNameDefine the name of the field to which this rule should be applied (if blank, then the rule is applied to the row)
CSS to be appliedcssCSS to apply when the above condition is met

...