Content Marker Macro

Marks a piece of content within a document. This content can be referenced for transclusion.

Audience
Categories
Transclusion / Marker
Tags
ID
projectdoc-content-marker
Type

The macro allows to mark content to be selectable for transclusion. It also allows to hide the content on given constraints.

Properties

Identifier

The identifier uniquely identifies the content within the document. An HTML element will be rendered with this identifier as value to the HTML attribute id.

If the identifier has the hashmark as prefix, it is used verbatim. If the prefix is not a hashmark, the system will ensure the uniqueness of the element within the space and on the page.

Tags

Allows to tag the content for transclusion with the Transclusion Macro. You may specify more than one tag in this comma separated list.

Hide

The flag allows to not render the content, if checked. Use this parameter to temporarily hide content from being show to readers.

Consider Empty

If this parameter is checked, then the content is considered to be empty for all checks conducted by the projectdoc Toolbox.

This allows users to add content that is only rendered in case content that is not empty or considered empty is actually present.

Empty Block Text

The block is considered empty if the text matches the content.

Note that only content rendered on the server side is considered. If the content is altered by a JavaScript on the client side, this parameter has no effect.

Ignore Template Buttons

If checked template button macros are regarded as whitespace.

This allows to add a template button to create subordinate pages without rendering the section just because of the button being part of the body.

Ignore Elements

If checked HTML elements that do not provide text information are considered empty.

For instance a table with no table date text content, providing only header text, are considered empty if the box is checked.

Required Roles

Readers require the given roles to have access to the content. If not specified, the content is accessible to anyone.

The user must have one of the specified roles, not all, to access the content.

Add the name of roles here you have (optionally) defined with a role document. It is required that the name of the role is created as a Confluence group.

Required Permissions

Readers require the given permissions to have access to the content.

PermissionDescription
no-permissions-requiredThe content is accessible by anyone who has access to the page.
not-authenticated

Users are required to be not authenticated to have access to the content.

This allows text to be rendered in case a user is authenticated or not authenticated.

authenticated

Users have to be logged in to access the content.

Usually you have to be a team member in the role of a reader to access the content.

write-access

Users have to have write access to access the content.

The content will only be rendered to authors.

The space property Pretend Being A allows to override this value.

Required Document Properties

The listed document properties are required to be set to a non-empty value to show the content.

The names have to be comma-separated.

The property names are allowed to be prefixed with an exclamation mark (!) in which case the content is only shown if the value of the space property is not blank.

It is possible to check for a certain property value.

property-name=my-value,!property-name2=other-value

In case the properties list is starting with a pipe character ("|") then at least one of the properties is required to match.

Required Space Properties

The listed space properties are required to be set to a non-empty value to show the content.

The names have to be comma-separated.

Property names are allowed to be prefixed with an exclamation mark (!) in which case the content is only shown if the value of the space property is not blank.

space-property-name=my-value,!space-property-name2=other-value

In case the properties list is starting with a pipe character ("|") then at least one of the properties is required to match.

CSS Classes

Specify the CSS classes to be attached to the div element (HTML) around the marked content.

Merge Block Elements

Controls whether (true) or not (false, default) to merge block elements to a single element.

The following block elements are supported.

Block Element
p

All paragraphs will be merged into one. The contents of each merged paragraph will be rendered in a span element, with the parent's attributes applied.

The use case is to split parts of a paragraph into multiple Content Marker Macros and then allow to rendered the paragraph again in one block.

ul

Allows to merge bullet / unordered lists that are on any level, but not contained within another list element.

This allows to merge lists that have been rendered separately within Content Marker Macros and then allow to render the multiple lists as one.

This use case is focused on merging Content Marker Macros. For other use cases the Table Merger Macro allows to merge lists, too.

olAllows to merge ordered lists. For details please refer to the description of ul above.

Apply Document Properties

If checked (true) properties of the document and space are applied to resolve placeholders.

The standard placeholders are supported:

  • ${...} - text replacement
  • $<...> - HTML replacement
  • $[...] - text replacement with link to current document

If space default is selected, the behavior is controlled by the space property Apply Properties to Content (projectdoc.macro.content-marker.apply-document-properties).

Render Counter Context

Defines the context of a render counter sequence. 

This allows to render the same sequence in different contexts.

Render Counter

Defines a sequence counter to render index numbers.

Specify the name of the sequence and each encounter of the sequence name on a Content Marker Macro will increase the sequence counter by one.

This allows to render the index number of an element for reference. For instance each Content Marker Macro may contain a sentence within a paragraph. The rendered index key allows to easily track each sentence.

The counter element is rendered with a class attribute value of projectdoc-render-counter-element. The render counter will also be added to the class attribute.

If the counter should not be rendered as a separate HTML element, use the space property Skip rendering Counter Element. Otherwise specify the template to use for rendering by the space property Render Counter Template.

The start index number can be set via a document property of the form {render-counter-context}#{render-counter}. The value is expected to be an integer.

Wrapping Element

Specify the HTML element to enclose the content rendered by this macro.

Force Not First Child

Check to prevent the content being considered to be the first child.

This is a workaround for authors who need to force the contents of this macro not to be the first child in a container.

The parameter may be set to a value of true as a page or space property by the name projectdoc.fix.content-marker.firstChild.

Details

Author Support

For supporting authors with using transclusions, the macro renders the title of the body content with the section's id and tags (highlighting the text block). Authors may use this information with the Transclusion Macro.

If the author sets the space property Pretend Being A to true, the help is not rendered.

Related macros

Name Short Description Notes
Renders a section, if the body is not empty. Supports authors to create content, clutter-free rendering without empty sections. Allows to transclude the content.
Similar to the Content Marker Macro, but also allows to render a section header.
Transcludes content from a document marked with the content marker macro.
Transcludes content from this macro into another page.

Resources

Identify Document Elements
In case an author requires to identify document elements to readers, for instance a numbering of paragraphs or sentences, the Content Marker Macro allows to employ a page-related auto-numbering and provides means to specify the format for these consecutive numbers.