Single-Sourcing Micro Content Using Styles

If you link a micro content phrase to a topic or snippet, by default the same content will always display (with the same look) when viewing the topic and micro content search result in the output. However, there is a way to navigate around this behavior so that you can control differences between the topic and the micro content. The solution is to use a descendant advanced selector in your stylesheet, with the following classes in front of your regular selector:

.micro-content-container .micro-response

Example You have the following set of steps in a topic, and you want to create new micro content from them.

You right-click the ol structure bar and select Create Micro Content.

In the dialog, you enter a micro content phrase and click OK. The phrase is added to the micro content file and linked to the set of steps, as indicated by the extra structure bar in the XML Editor.

When the steps are shown in the topic in the output, you want them to look just as they do in the XML Editor. However, when the steps are shown in micro content search results, you want the comment after Step 2 to be hidden. Also, you want to use a smaller font and less space between the steps.

So in your stylesheet, you create the following complex selectors:

In the XML Editor, you click on the paragraph after Step 2 and apply the .topic-only class to it.

When you generate and view the output, the topic looks like this:

And the micro content search result looks like this:

Note It might be possible to use only .micro-response when creating a complex selector, but in many cases both classes are needed: .micro-content-container and .micro-response.