Versions Compared

Key

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

...

Document Properties Marker
doctypemacro
overridefalse
extract-short-desctrue


Doctypemacrohide
NameTransclude Documents Macro
Short DescriptionRenders transcluded content fetched from documents of a result set.
Parent
Parent Property
property-nameName

Audience
Name List
doctyperole
render-no-hits-as-blanktrue
render-list-as-comma-separated-valuestrue
namesAuthor, Template Author
propertyAudience

Categories
Name List
doctypecategory
namesDisplay / Query

Tags

Tag List
cssprojectdoc-compact
namesDynamic List, Query, Transclusion, Deep Link, Remote Control, Context Control


Type

Name List
doctypemacro-type
render-list-as-comma-separated-valuestrue
namesDynamic Navigation, Content Reuse


Iteration

Iteration
valuefinished

hide
Since1.5.0
Supports Wiki Markup(tick)
Sort Keyhide


...

Section
indextrue
show-titlefalse
titleDescription
List of fragments transcluded from 3 pages. Use has edit privileges, therefore the edit widget is rendered.

With the Transclude Documents Macro document authors transclude from result sets of document queries.

Since the macro requires properties to be set to select on documents, the macro transcludes only from projectdoc documents.

This feature is very convenient if used to transclude child documents, using the Restrict to immediate Children 115639121 parameter. Consider to use Section documents since they make it easier to define a default sort order (a feature supported by all doctypes of type Subdocument 115639121).

Transcluded fragments are easily recognizable by authors (users with page edit permissions). They are surrounded by a Render Reference Box 115639121 that also renders widgets to quickly open the page transcluded from in edit mode (see Transclude Child Documents 115639121 for details).

All information is transcluded on request time. Since the macro runs a query, the list of hits is also dependent on request time and the access permissions of the user requesting the page.


Version Box
since2.5

Wiki Markup is supported since version 2.5.


...

Section
titleDetails


Section
titleTemplate Authors

Template authors may wish to reference the value of a property of the document the query is part of. Use ${...} to reference the value of a property.

  • Type = ${Name} - the type property of the documents queried is matched with the value of the name property of the document the query is part of.


Section
titleTransclude Child Documents

Its fairly simple to transclude all sections of the child documents. Just check the Restrict to immediate Children 115639121 checkbox and set the Target Heading Level 115639121 to '*'. The target level will adjust the section levels of the transcluded documents to fit the level in the transcluding document.

Example Box
titleTransclude Child Documents

The example shows two child documents that are transcluded. Note that the box around the transcluded content is only rendered for page authors. This allows them to jump to the transcluded document quickly.

The editor shows the checked restriction on children and the selection of the target heading level.

The screenshot of the parent document shows the transcluded child fragments rendered at level 3 under the level 2 section (arbitrarily) named 'Excerpts'.

If the user has edit privileges, an additional edit widget will be rendered to open the transcluded page in edit mode quickly.

Please note that only sections are transcluded. Therefore you have to define sections in the child documents. If you do not need to transclude all sections, use Identifiers 115639121 (typically the page titles) and Tags 115639121 to filter.


Section
titleRemote Controlled Documents


Version Box

Remote Controlled Documents are available since version 2.0 of the projectdoc Toolbox.

Remote Controlled Documents allow to control the content at request time. A HTTP request may override parameters of the transclude documents macro. A request parameter addresses a macro by its identifier. After the identifier the name of the parameter is appended, separated by a colon.

Example Box
titleOverride Parameters

Assume that the identifier of the transclude documents macro is set to 'my', the following call will override the doctype parameter on the page 'MyPage' in space 'MYS'.

Code Block
confluence/display/MYS/MyPage?my:doctype=blank

Also the body can be overridden to replace placeholders in the transcluded fragments.

Example Box
titleOverride Body
body=Placeholder1%3DMyValue1\nPlaceholderX%3ValueB


The list of parameters allowed to override:

  • doctype
  • ids
  • tags
  • select
  • where
  • sort-by
  • max-hit-count
  • restrict-to-immediate-children
  • taget-heading-level (yes, the 'r' is missing!)
  • render-document-name-as-heading
  • apply-document-properties
  • space-key
  • space-keys
  • render-no-hits-as-blank
  • render-no-hits-as-blank-text
  • render-error-on-no-content
  • remove-buttons
  • extract-short-desc
  • render-heading-as-link


...