Conditional MultiExcerpt

Conditional Multi-Excerpt plugin for Confluence is useful for following purpose:

    • Structuring the content in reusable chunks with help of Conditional Multi-Excerpts
    • Reuse the content to avoid duplicate effort in maintaining same content at different places
    • Use same conditional multi-excerpt even if content should be displayed at different places slightly different

Conditional Multi-Excerpt plugin comes with 2 macros to create common single source content and reusing it

    1. Conditional Multi-Excerpt
    2. Conditional Multi-Excerpt Include

Related Concepts

  • SpaceKey - SpaceKey is a key representing a Space of Confluence. It is provided during Space creation and generally is also part of Url. http://<yoursite>/display/spacekey/<page> More details
  • Condition Keyword - Condition Keyword or SpaceKey Keyword map setting appears appears under TechAuth->Set Condition Keyword after Conditional Multi-Excerpt plugin installation. This map should be used to provide keyword as Spacekey:keyword combination. Keyword provided in this map is used to create conditional tags as KEY_keyword_ST and KEY_keyword_END.

Using the Conditional Multi-Excerpt plugin

First step to use this plugin is to decide condition keyword(s) which is just a Logical group name to spaces wherever you are using Conditional Multi-Excerpt. This group name could be your product names or feature name or just version (ex, prodA, featureA or ver500). This group name can be configured using TechAuth->Set Condition Keyword link at top navigation bar of Confluence. Conditional Tag is decided on basis on this keyword. As for example see following image

Fig1: providing Conditional keyword

Sample space taken for example is http://<site_base_url>/display/Tiger/<page>. Tiger spacekey is assigned a name wild. So, whichever space is assigned to wild group, content provided under KEY_wild_ST and KEY_wild_END tags will be displayed. So, while using Conditional Multi-Excerpt macro these tags could be used to provide content that is specific to wild group.

Any content provided outside these tags will be shown as it is wherever Conditional Multi-Excerpt Include macro is used to reuse the content. As for example if there is another space cat (http://<site_base_url/display/cat/<page>) and is assigned to group 'domestic' then conditional multi-excerpt use and output will look like

Conditional Multi-Excerpt and Conditional Multi-Excerpt Include macro UI looks like following

If no conditional part is provided, content of Conditional Multi-Excerpt will be shown as it is wherever it is reused with help of Conditional Multi-Excerpt Include macro.

Example Use Case

For one more working example suppose we have got two spaces

First space http://<yoursite>/display/prodA500/<page> which explains about prodA version 5.0.0

Second space http://<yorsite>/display/prodA622/<page> which explains about prodA version 6.2.2

(However, using our solution these 2 spaces could be merged in 1, depending on complexity and amount of difference in content)

Step wise procedure of using Conditional Multi-Excerpt for better content management is as follows:

  1. Set Condition Keyword or SpacKey Keyword map for space http://<yoursite>/display/prodA500/<page> as prodA500:ver500 as shown in Fig1. After clicking TechAuth->Set Condition Keyword a UI will appear as shown in Fig1. Since spacekey of our first example space (where we will create content) is prodA500 so in SpaceKey Keyword Map enter prodA500:ver500
  2. Now use Conditional Multi-Excerpt macro in pages of first space (http://<yoursite>/display/prodA500/<page> ). Inside macro body enter your desired content. Now put KEY_ver500_ST before the content that is specific for version 5.0.0 of your product and KEY_ver500_END after the content that is specific to your product version 5.0.0
  3. Similarly follow the same steps for space http://<yoursite>/display/prodA622/<page> and put Condition keyword or SpaceKey Keyword map as prodA622:ver622. While providing content inside Conditional Multi-Excerpt macro put KEY_ver622_ST before the content that is specific to your product version 6.2.2 and KEY_ver622_END after the content that is specific to your product version 6.2.2
  4. Now in prodA622 space open the page where you want to reuse the content created in space prodA500 and include the content using Conditional Multi-Excerpt Include macro (provide source page name and Conditional Multi-Excerpt name)
  5. Space prodA622 will show the content that was inside KEY_ver622_ST and KEY_ver622_END tags and the content that was outside all used tags. Similarly prodA500 space will show the content that was inside KEY_ver500_ST and KEY_ver622_END tags and the content that was outside all the tags. (see cat and tiger example shown in image above for reference)

(NOTE: Same effect can be created in single space too. As for example in above case if we will change the Condition Keyword or SpaceKey Keyword map of space prodA500 to prodA500:ver622, then after refreshing page of prodA500 space, content will displayed that was under KEY_ver622_ST and KEY_ver622_END tags.)

Credits

Our customers play and important role in making our solution better. Thanks to everyone who provided feedback, suggestions and reported some issues. Special thanks to Gillian Flato (Thales eSecurity) for specific suggestions.

Atlassian Marketplace Listing URL - Conditional MultiExcerpt