Hello everybody,
I'm currently working on getting our technical documentation in Confluence server and a large portion of the documentation is boilerplate text that will be the same over multiple projects.
The current idea I have (originating from here) is to use excerpt-include or include page to include multiple template pages (from a template Space (TS)) to build up a project page.
One thing that is not working correctly is that I would like to have a project/space defined variable (defined in _ConfluenceInclusions) that is present in this template text and will be automatically updated using the space variable.
Example:
Template page (device_page) in Template Space (TS):
This is a test page and refers to the device: _device_name
Project page in Project Space (PS):
This information is about a brand new device:
{excerpt-include:TS:device_page|nopanel=true}
The idea would be to replace the _device_name with a local space variable so the boilerplate code can be the same for every instance of this template but still match the local device reference.
I did find the Keysight Include Content plugin but its kind of difficult to use for non technical users.
While browsing the documentation and community I did not find exactly what I am looking for.
Any ideas / suggestions?
Thanks!
Still haven't found an exact solution to this.
projectdoc Toolbox Seems to have some items that might work. But the hurdle seems to be that I want to use per scope variables inside template files.
Q: @Robert Reiner _smartics_ Could you advise?
There are a few solutions to the problem to transclude content from another page with the projectdoc Toolbox.
Straight forward would be to create a section (using the Section Macro) and add text with placeholders, e.g. in a dedicated template space:
"This is the text of ${Product Name} that ..."
Note the placeholder with name "Product Name".
From a projectdoc Document (may also be a plain Confluence page) within another space (e.g. the Super Tool space) you could use the Transclusion Macro and replace the placeholders with properties provided as space properties (see Using Space Properties for how to define space properties) and document property by checking the parameter "Apply Document Properties". If unchecked, only key/value pairs in the body of the macro will be applied.
Assuming that there is a space property "Product Name" with the value "Super Tool" the transcluded text will be rendered as
"This is the text of Super Tool that ..."
There is a tip on our website Using Placeholders that provides information for this use case.
As an alternative you could use the Impersonator Feature. There is also a tip on our website Impersonator - using Live Templates that explains it. The impersonation allows to render the transcluded content in the context of the transcluded page. For simple text replacements this makes no difference (as long as the context of the transcluded page does not already provide values for the placeholders). But in case -- for instance -- you need to list components of a product, the list would be rendered in the context of the product page.
If I misunderstood your use case or if you have problems to run your use case with my explanation, please get in touch! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Robert Reiner _smartics_ ,
thank you for you extensive answer. I will give the plugin a try in the upcoming weeks.
I will let you know if I have any issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Erick van Rijk,
Thank you for your feedback!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.