Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Content Layer
id609746338
classsmartics-comparision
Content Column
id609746340
Content Block
id609746339
Document Properties Marker
overridefalse
Short DescriptionLearn about additional features provided by the Code Block Macro provided by the projectdoc Toolbox. 
Doctypetest-casehide
NameWorking with Code 
Parent
Parent Property
propertyParent
property-nameName
 
Audience
Name List
doctyperole
propertyAudience
 
Subject
Name List
doctypesubject
propertySubject
 
Categories
Name List
doctypecategory
propertyCategories
 
Tags
Tag List
propertyTags
 
Iteration
Iteration
valuefilled
hide
Source 
Result 
Sort Key00003000hide
project.groupIdde.smartics.atlassian.confluencehide
project.artifactIdsmartics-projectdoc-confluencehide
project.version1.10hide
TeaserDetailed examination on the featureshide
Section
show-titlefalse
titleDescription

The Code Block Macro makes it easy to render code snippets beautifully. The Code Block Placeholder Macro version provided by the projectdoc Toolbox connects the configuration to properties defined by the document or space.

 

Rendering Code

 

Code Block Macro

The plain code in the macro body:

The macro is rendered as follows:

Code Block
languagexml
themeEclipse
titleDependency Snippet
linenumberstrue
<pluginArtifacts>
  <pluginArtifact>
    <groupId>de.smartics.atlassian.confluence</groupId>
    <artifactId>smartics-projectdoc-confluence</artifactId>
    <version>1.10</version>
  </pluginArtifact>
</pluginArtifacts>

Code Block Placeholder Macro

The code with placeholders in the macro body:

The macro is rendered as follows:

Code Block Placeholder
code-linenumberstrue
code-themeEclipse
code-languageHTML and XML
code-titleDependency Snippet
<pluginArtifacts>
  <pluginArtifact>
    <groupId>${project.groupId}</groupId>
    <artifactId>${project.artifactId}</artifactId>
    <version>${project.version}</version>
  </pluginArtifact>
</pluginArtifacts>

The properties may be either defined in the page as document properties or on the homepage of the space as space properties. In either case the fragment in the table enclosed in the Document Properties Marker Macro looks like this:

This allows to change the values in a central place.

Summary

Transclusion
documentPDAC1:Rendering Code Fragments
idsSummary

 

Section
required-permissionswrite-access
titleNotes

Section
titleReferences

Section
titleResources