Make part of the reused content differ
To make the content differ in different includes, you can use variables and filters.
Refer to the instance name
Use the
Writerside
variable in the warning content to refer to the instance name:<snippet id="generic_warning"> <warning>This version of %instance% support ended on January 14, 2021. Download the latest version.</warning> </snippet>
Use a variable with the version number
Declare the variable inside the snippet you want to reuse.
<snippet id="generic_warning"> <warning>This version of %instance% support ended on January 14, 2021. Download the %latest% version.</warning> </snippet>In the target topic use the
var
tag and specify thename
andvalue
attributes.<include from="warning_libraries.topic" target="generic_warning"> <var name="latest" value="1.7"/>
Display warning for all instances except one
You can specify the instance in which an element should or should not display.
Add the
instance
attribute to thewarning
tag, use ! symbol and specify the ids of the instances where this warning should not be displayed.<warning instance="!sd">This version of product support ended on January 14, 2021. Download the latest version.</warning>You can add the
if
tag to select a specific fragment of content.<warning instance="!sd"><p>This version of product support ended on January 14, 2022.</p> <p if instance="ac">Download the latest version <a href="link1">here</a>.</p> <a if instance="!ac">Download the latest version <a href="link2">here</a>.</p> </warning>
For more information about variables and filters, refer to the specified sections.