Macro Tutorial

Macro Tutorial

Display macro parameters, macro body and macro renderer in a table format

Parameters

TitleTitle to display before the table

Using the Macro Tutorial Macro

To add the Macro Tutorial macro to a page:

  1. Edit the page and use autocomplete to add the Macro Tutorial macro. (Type '{macro-tutorial}')
  2. Add a macro in the body of the macro placeholder.
  3. Put some data in the body of the nested macro if required. (See Screenshot 1 below)
  4. Click the macro placeholder of the nested macro and choose Edit.
  5. Choose some parameter settings in the macro browser of the nested macro.
  6. Click Refresh in the 'Preview' area, to check that the nested macro content appears as you expect. (See Screenshot 2 below)
  7. Click Save to add the nested macro content to your page.
  8. Click the Macro Tutorial placeholder and choose Edit.
  9. Insert a text in the Title parameter.
  10. Click Refresh in the 'Preview' area, to check that the macro tutorial table appears as you expect. (See Screenshot 3 below)
  11. Click Save to add the macro tutorial table to your page.
  12. Click Save again when you are ready to save the page. (See Screenshot 4 below)

Screenshot 1: Code block macro inserted in the Macro Tutorial macro placeholder

macrotutorialScreenShot1.png

Screenshot 2: Parameters and Preview of the Code Block macro

macrotutorialScreenShot2.png

Screenshot 3: Parameters and Preview of the Macro Tutorial macro

macrotutorialScreenShot3.png

Screenshot 4: The resulting documentation table of Code Block macro

Parameters in Macro Browser
Data in Macro Placeholder
Rendered datas
Key
Value
Syntax highlightingjava
TitleHELLO WORLD Syntax Highlighting
Show line numberstrue
ThemeDefault

code

public class HelloWorld {

public static void main(String[] args) {

System.out.println("Hello, World");

}

}

HELLO WORLD Syntax Highlighting

 

1
2
3
4
5
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World");
    }
}