Knowledge Base contributors can insert dynamic content into their articles. Natalia - Can you please add a section about Content by Label.
This article demonstrates useful macros for the Knowledge Base and explains best practices for using their functionality.
For information on how to find and insert these macros, see What are Macros?
Table of Contents
Overview
Macros are visuals that dynamically organize your content and allow you to draw attention to aspects of your content that you want to have stand out to your readers. They are especially useful when you have a piece of information that is important for your readers but does not fit into the rest of your article. Additionally, macros provide additional functionality to your articles, enabling you to link pages, condense your content into accordion folders, insert page anchors, create and insert project timelines, and much more.
Inserting Macros
Create your new page.
Select the "+" in the toolbar.
Select the macro you want to use from the drop-down menu. Alternatively, you can select View More at the bottom of the menu to see the full suite of macros.
Once you are in the suite of macros, you can browse through the different categories on the left or use the Search bar at the top.
Helpful Macros and Their Functions
The "Tip," "Info," "Note," and "Warning" Macros
The tip, info, note, and warning macros are useful ways to call out details that users should give special attention to.
When creating any one of these macros, type the name of the macro in the Search bar of the “+” icon.
Example 1
For a Note macro, enter "Note."
Tip Macro
The Tip macro is used when providing information that will enhance the reader's abilities.
When creating macros, title the macro for what it is (e.g., title a tip macro "Tip"). This will help the reader understand the purpose of the information.
Info Macro
The Info macro is used when providing information that may be of interest to the reader but that is not necessary to understand.
Confluence allows article writers to easily move the macros around the page by clicking and dragging.
Note Macro
The Note macro is used when providing information that is necessary for users to understand.
Macros should only be used when providing information that should be represented separately from the rest of the article content. Avoid using macros to provide information that would easily fit in the regular content of your article.
Warning Macro
The Warning macro is used when you need to alert your readers to an exceedingly important detail. Warning macros are for cautionary messages and should be used only when the information being conveyed is urgent.
Make sure you are working on the "IT Knowledge Base" space.
Error Macro
The Error macro is used when providing the reader with critical information pertaining to the article. The information usually consists of consequences or a way to tell the readers something that could go wrong.
If you click the Trash icon when editing helpful macros, then the macro will be deleted.
Tip: you can change an already inserted bar using Left-Click.
The "Content by Label" Macro
The Content by Label macro is a way to use labels to automatically display links to related articles on our space. Insert this macro at the bottom of every page under the "Related Articles" heading. The Content by Label macro chooses articles to display based on the labels you set when creating articles.
Inserting and Using the “Content By Label” Macro
Scroll to the bottom of the page.
Click on the area you wish to insert the macro.
Click on the “+” icon and type “Content by Label” into the Search bar.
It should then bring you to an Edit Menu that looks like this:
This Edit menu allows you to add Labels to the article, which means that any word that matches another article will be recommended in the macro. There are also different options that can be expanded upon below the Label Bar by clicking on the Show button, this includes:
Sort By: You can sort how the labels relate to other articles, it can be by the title, by their creation date (newest to oldest), or the most recently modified version of the article.
Maximum Number of Pages: You can set how many pages the “Content by Label” macro is, with the default being 15.
List Title: This allows you to add a title to the macro.
Excerpt Display: This changes how the excerpts are displayed for each page. You can use:
None: Only shows the links to each article.
Simple: Adds specific labels underneath each article.
Rich: Makes the macro much more detailed, adding notes and information about each link.
Be careful with typos, as they will not be autocorrected once they have been input as a label.
The "Expand" Macro
The Expand macro is a great way to condense and categorize your content. If you have lists, bullet points, or section-specific information that you do not want to clutter your article, you can condense this into a clickable link that will display your content. For example, click the blue text below.
Inserting and Using the Expand Macro
Go to the “+” icon and use Search bar to look for Expand. Click on it and it will be inserted into your article.
Once the Expand macro is inserted into your article, you can begin typing your text, inserting photos, charts, visuals, or creating lists.
Although it was available in the previous version of Confluence, you cannot add an expand macro within another expand macro.
The "Table of Contents" Macro
The Table of Contents macro allows you to link different parts of your article to the top of the page. This allows the reader to quickly access the information they need (by selecting the link) instead of having to scroll through the whole article to find what they need. For example, selecting your topic of interest at the top of this article allows you quickly navigate to the information you want to see. You are not required to use the Table of Contents macro, but it can be a great way to streamline your reader's experience. The Table of Contents macro should be used for long articles or articles that require a lot of scrolling.
The Table of Contents macro chooses the links to display solely based on the headings and heading numbers. You only have to set up the table of contents macro to choose the correct headings (see below).
Using the "Table of Contents" Macro
Scroll down to the section of the macro setting window displayed below.
You can change "Maximum Heading Level" to as many headers as you need. This ensures that the table of contents will only contain links to sections according to the number of headings within your article.
Under "Exclude Headings," type Table of Contents. This will ensure that there will not be a link to the Table of Contents in the Table of Contents.
Placing the "Table of Contents" Macro
Put the Table of Contents macro at the top of the article after the article summary but before the rest of the article. See the top of this article for an example.
Time-Saving Tips
When adding macros,
Type "/" followed by the macro name.
Select the macro you want to insert.
For a complete list of Confluence macros and other time-saving tips, see Confluence Macros and Confluence Keyboard Shortcuts.