MultiExcerpt - Server/Data Center - 5.5.7

MultiExcerpt version 5.5.7 introduces a new feature that allows switching of the page context used to render the body of an included excerpt:

 

Use MultiExcerpt Include Page Context

There is a new parameter in MultiExcerpt Include macros:

The parameter is disabled by default and that gives the default behavior that existed before this enhancement was delivered: an included MultiExcerpt is rendered in a MultiExcerpt Include using the page context of the MultiExcerpt (not the page context of the MultiExcerpt Include).

This default behavior for the page context used to render includes is typical and you can also see it in Confluence’s Excerpt/Include Excerpt and Include Page macros.

The new feature allows a MultiExcerpt Include to override the default behavior and use the page context of the MultiExcerpt Include to render the body of the include MultiExcerpt.

This new feature is useful for use-cases where the MultiExcerpt contains some logic that depends on the context of the page it exists on. For example, the MultiExcerpt macro could contain a “create from template” macro that can be configured to create a page in “this” space. The default behavior for that scenario is for the “create from template” macro to create a page in the space that the MultiExcerpt is in (“this” space) when you execute it from a MultiExcerpt Include. However, if the new feature is enabled by checking “Use MultiExcerpt Include Page Context” then when you use the macro from a MultiExcerpt Include the “create from template” macro will create a page in the space that the MultiExcerpt Include is in (“this” space).

There are many, many possibilities for usage of this new parameter. Any reused logic, contained in a MultiExcerpt and rendered from a MultiExcerpt Include, may want to use this new parameter if that logic depends on anything on “this” page (the space that this page is in, labels on this page, etc, etc).