Section Macro

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.

Audience
Categories
Transclusion / Marker
Tags
Selectors
ownMacroStyle
ID
projectdoc-section
Type

The Section Macro renders a section with a title and its content. The content is added to the macro's body.

If the content is empty, the section will not be rendered. This macro is an essential element for template authors. The structure of a template for a document type can be defined so that document authors have guidance which information to place where. But as long as no content is provided by the document author, the reader of the document is not distracted by empty sections.

Properties

Title

 The section title to be rendered. The section title will also be used as an unique identifier of the section within the document.

From version 1.7 on the title is mandatory. This allows authors to create the macro and add a title with greater speed.

Level

The level of the heading. This will create an HTML header element.

Delegate on Empty

If checked (default), the macro transcludes the section with the same name as this section from the delegate document, if the content of the section is not empty.

You may control the output if the referenced section is not available in the delegate document. Per default, nothing is rendered (same as in the case the section in the delegate document is empty). If you set Delegate Document Suppress Error Message Section to false, an error message will be rendered in the delegating page.

If no delegate document is provided with the Document Properties Marker Macro, this parameter has no effect.

Available since version 1.10.

Show Title

If this box is unchecked, the title will not be rendered.

Since version 1.7 on the title is mandatory, this checkbox - also available since version 1.7 - is necessary if the section should be displayed without a title.

Identifier

The identifier uniquely identifies the content within the document. This overrides the title as the default.

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.

Intro Text

Allows the template author to add a text to introduce the content. Any text added here is considered as not present, if the content is empty. If you are not designing a document template, this attribute is of little use and you will probably add the text to the macro's body.

Extro Text

Like the Intro Text property, but will be rendered after the section's content.

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.

This is similar to the Intro Text and Extro Text parameters whose content is also only rendered if the content of the section is not empty.

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.

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

CSS Classes

Specify the CSS classes to be attached to the created section.

Not that the enclosing HTML DIV element renders a CSS class that includes the identifier of the doctype. This allows users to render sections on different doctypes differently.

Numbering

Switch on or off the numbering for the heading.

The numbering is created with CSS. If the output format does not apply CSS styles, no numbers will be rendered.

For more information on how to control numbering in your projectdoc documents, refer to these space properties:

Numbering Start

Specify the start of the first level numbering. 

Details

Author Support

For supporting authors with using transclusions, the macro renders the title for the heading with the section's id, tags and HTML anchor information (highlighting the header). Authors may use this information with the Transclusion Macro or reference the section from a remote page.

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

Related Macros

Name Short Description Notes
Marks a piece of content within a document. This content can be referenced for transclusion.
Similar to the Section Macro, but without a title.
Transcludes content from a document marked with the content marker macro.
Transcludes content from this macro into another page.
Transcludes content via a reference from a document marked with the content marker macro.
Transcludes content from this macro via a property reference into another page.
Renders transcluded content fetched from documents of a result set.
Multi-transclusion of content from other pages.

Resources

More information on sections in this manual.

Section in Action
Use the Section Macro to define sections. This tip introduces the macro by listing its features.
The hidden Section
The Content Marker Macro identifies content that can be displayed using the Display Table Macro. This is a short tip on how to transclude content from a projectdoc document.
No need to render the Section Title
It is often obvious that the introduction text is a description of the information of the document. Therefore the title 'Description' or 'Summary' may be irrelevant. You may suppress the rendering of the title easily.
Documentation JSON URI
The URI to a JSON document containing the URLs to the documentation for the blueprints.
DocumentationMap
Stores the documentation map to link to doctype documentation.