projectdoc Toolbox

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

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.

Since 4.9

 

The verbatim identifiers are supported since version 4.9 of the projectdoc Toolbox.

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.

Since 4.5

 

This parameter is available since version 4.5 of the projectdoc Toolbox.

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.

Since 4.7

 

This parameter is available since version 4.7 of the projectdoc Toolbox.

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.

Since 5.0

 

This option is available since version 5.0.4.

Required Roles

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

The Content is not secure!

 

Please note that this is only a convenience for the user. The content of the box is for example still indexed by Lucene or will be displayed, e.g. if the user has access to the page's source code or there is a preview function on a page.

Therefore do not add confidential information!

The hiding mechanism is therefore to be considered on the same level as hiding HTML fragments by means of CSS or client-side JavaScript. The user has access to the information.

Especially do not use this macro for property values with the Document Properties Marker Macro! Use this macro in document bodies only.

Note on using confidential information: If allowed by your information policy, put confidential information on a separate page (using page restrictions to control access) and use the Transclusion Macro to render it on a page.

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.

Case insensitive

 

Note that while Confluence group names are required to be lower case, the names of roles may still be provided in mixed case.

Required Permissions

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

The Content is not secure!

 

Please note that this is only a convenience for the user. The content of the box is for example still indexed by Lucene or will be displayed, e.g. if the user has access to the page's source code or there is a preview function on a page.

Therefore do not add confidential information!

The hiding mechanism is therefore to be considered on the same level as hiding HTML fragments by means of CSS or client-side JavaScript. The user has access to the information.

Especially do not use this macro for property values with the Document Properties Marker Macro! Use this macro in document bodies only.

Note on using confidential information: If allowed by your information policy, put confidential information on a separate page (using page restrictions to control access) and use the Transclusion Macro to render it on a page.

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.

Since 4.2.1

 

This option is available since version 4.2.1.

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 Content is not secure!

 

Please note that this is only a convenience for the user. The content of the box is for example still indexed by Lucene or will be displayed, e.g. if the user has access to the page's source code or there is a preview function on a page.

Therefore do not add confidential information!

The hiding mechanism is therefore to be considered on the same level as hiding HTML fragments by means of CSS or client-side JavaScript. The user has access to the information.

Especially do not use this macro for property values with the Document Properties Marker Macro! Use this macro in document bodies only.

Note on using confidential information: If allowed by your information policy, put confidential information on a separate page (using page restrictions to control access) and use the Transclusion Macro to render it on a page.

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.

Since 4.2

 

The OR semantics are supported since version 4.2 of the projectdoc Toolbox.

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.

The Content is not secure!

 

Please note that this is only a convenience for the user. The content of the box is for example still indexed by Lucene or will be displayed, e.g. if the user has access to the page's source code or there is a preview function on a page.

Therefore do not add confidential information!

The hiding mechanism is therefore to be considered on the same level as hiding HTML fragments by means of CSS or client-side JavaScript. The user has access to the information.

Especially do not use this macro for property values with the Document Properties Marker Macro! Use this macro in document bodies only.

Note on using confidential information: If allowed by your information policy, put confidential information on a separate page (using page restrictions to control access) and use the Transclusion Macro to render it on a page.

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.

Since 4.2

 

The OR semantics are supported since version 4.2 of the projectdoc Toolbox.

CSS Classes

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

 

Assume an index contains h2, ul, and link elements.

The following CSS statements format the main index for a container with a class attribute value of projectdoc-topic-main-index.

/* Headings */
.projectdoc-topic-main-index h2 {
  color: #FFA62F;
  margin-top: 10px;
  font-size: 12pt;
}
div.hasIdOrTags.projectdoc-topic-main-index {
  opacity: 1.0;
}
/* Lists */
.projectdoc-topic-main-index ul {
  color: #3B73AF;
  margin-top: 0px;
  margin-bottom: 9px;
}
/* Links */
.projectdoc-topic-main-index a:link,  .projectdoc-topic-main-index a:visited {
  color: #3B73AF;
}
.projectdoc-topic-main-index a:hover {
  color: #F87217;
}
.projectdoc-topic-main-index a:active {
  color: #C35817;
}

Add these statements to the space stylesheet:

The result for the example above:

Since version 2.0 of the projectdoc Toolbox it is possible to style the section even more easily. Instead of defining your own CSS classes, you can take advantage from a set of predefined CSS classes to support rounded boxes and different colors.

Using the CSS class projectdoc-section-box applies the following styles to a block element:

.projectdoc-section-box {
    border-radius: 25px;
    padding: 20px;
    margin-bottom: 5px;
    margin-top: 25px;
}

Now in conjunction with three templates for CSS classes colored boxes can be rendered:

  • heading font color: projectdoc-h-COLORNAME
  • content font color: projectdoc-c-COLORNAME
  • background color: projectdoc-bg-COLORNAME

This is an example to render a box with the colors White, DarkBlue an Darkorange:

  • projectdoc-section-box
  • projectdoc-h-White
  • projectdoc-c-DarkBlue
  • projectdoc-bg-Darkorange

Set the classes as value for the property "CSS Classes" of the Section Macro (or Content Marker Macro):

With this CSS Classes set, the section macro

is rendered as a box like this:

Example of a colored section

This is an example of a colored section.

  • This is an example of a colored section.
  • This is an example of a colored section.

Here is a list of all supported HTML color names for the CSS templates:

AliceBlue
AntiqueWhite
Aqua
Beige
Black
BlanchedAlmond
Blue
BlueViolet
Brown
BurlyWood
CadetBlue
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Crimson
Cyan
DarkBlue
DarkCyan
DarkGoldenRod
DarkGray
DarkGrey
DarkGreen
DarkKhaki
DarkMagenta
DarkOliveGreen
Darkorange
DarkOrchid
DarkRed
DarkSalmon
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
DeepSkyBlue
DimGray
DodgerBlue
FireBrick
FloralWhite
ForestGreen
Fuchsia
Gainsboro
GhostWhite
Gold
GoldenRod
Gray
Grey
Green
GreenYellow
HoneyDew
HotPink
IndianRed
Indigo
Ivory
Khaki
Lavender
LavenderBlush
LawnGreen
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenRodYellow
LightGray
LightGrey
LightGreen
LightPink
LightSalmon
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSlateGrey
LightSteelBlue
LightYellow
Lime
LimeGreen
Linen
Magenta
Maroon
MediumAquaMarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
MediumVioletRed
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Olive
OliveDrab
Orange
OrangeRed
Orchid
PaleGoldenRod
PaleGreen
PaleTurquoise
PaleVioletRed
PapayaWhip
PeachPuff
Peru
Pink
Plum
PowderBlue
Purple
Red
RosyBrown
RoyalBlue
SaddleBrown
Salmon
SandyBrown
SeaGreen
SeaShell
Sienna
Silver
SkyBlue
SlateBlue
SlateGray
SlateGrey
Snow
SpringGreen
SteelBlue
Tan
Teal
Thistle
Tomato
Turquoise
Violet
Wheat
White
WhiteSmoke
Yellow


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.

Since 4.12

 

This parameter is supported since version 4.12 of the projectdoc Toolbox.

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

Since 5.0

 

This parameter is supported since version 5.0 of the projectdoc Toolbox.

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.

Since 4.12

 

This parameter is supported since version 4.12 of the projectdoc Toolbox.

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.

Since 4.12

 

This parameter is supported since version 4.12 of the projectdoc Toolbox.

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.

Experimental Feature

 

This feature is available with version 4.2 of the projectdoc Toolbox.

It is considered to be experimental and may be removed in future versions.

Prior to version 4.12 this parameter was called "Force First Child".

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.