Introduce a "source" parameter for the content macro

Similar to the recently introduced source parameter in code macro I would like to do the same for the content macro to provide a safe way to insert wiki content, especially for script variables.

My plan is to use the same naming, syntax and logic as the one defined on https://extensions.xwiki.org/xwiki/bin/view/Extension/Code%20Macro/#HSource for users, but it would be a different component system behind the scene (mainly because the content would come with a default rendering Syntax instead of a default language).

Here is my +1.

1 Like

+1. I wonder if it would be interesting to have the same/something similar for the HTML macro.

It’s most probably interesting for many macros, yes. The pull request I’m working on is trying to provide tools as generic as possible to introduce the same thing for other macros.

+1 thanks

+1 ‘global variables’ sound great!

First pull requests available on XRENDERING-701: Introduce a "source" parameter in the content macro by tmortagne · Pull Request #243 · xwiki/xwiki-rendering · GitHub and XRENDERING-701: Introduce a "source" parameter in the content macro by tmortagne · Pull Request #2064 · xwiki/xwiki-platform · GitHub