Nested page renderings don't work properly

Description

Nested page renderings don't work properly. If the rendering of a page, the current page ($page) or an included page ($include.page("My Page")), triggers the rendering of another page, the inner rendering replaces all rendering parameters and erases them when finished. The rest of the outer rendering, including the page layout, will fall back on defaults.

Example

page.vm:

1 2 3 $include.page("Page 1").renderContent("my-layout.vm", { "info" : "my-info.vm" })

my-info.vm:

1 2 3 $include.page("Page 2").renderContent("my-other-layout.vm", { "info" : "my-other-info.vm" })

If Page 1 contains an info macro, it will be rendered via the my-info.vm template. This template will render Page 2 while Page 1 is still rendering. The inner rendering replaces the parameters (layout and macro overrides) and erases them afterwards. The rest of the outer rendering will consequently fall back on defaults, ignoring the parameters of the outer renderContent call.

Workaround

Don't use nested page renderings. If the inner page is static, consider putting it in a theme template.

Environment

None

Status

Assignee

Maximilian Hilbert (K15t)

Reporter

Maximilian Hilbert (K15t)

Labels

Participants

None

Deployment

None

Components

Sprint

None

Fix versions

Priority

Major