I am trying to write a report in Confluence that displays content based on a select list. My thought was to use the Run macro for the select list and then the showIf parameter of the Hide macro to display the data. I'm not having much luck with the Hide macro however. I've placed the select list variable outside of the macro to make sure Run is producing the proper value which it is. I've even tried regexp to match just the last character but still not working
{run:id=1|replace=MyProject:aaa::select::aaa:a:bbb:b}
$MyProject
{hide:showIf=.*a:$MyProject}
Show this if option a is selected
{hide}
{run}
Your example works fine for me
{run:id=1|replace=MyProject:aaa::select::aaa:a:bbb} My project: $MyProject {hide:showIf=aaa:$MyProject} Show this if option a is selected {hide} {run}
Hmm. This is what I was trying initially and does not seem to work. I am using an older version of Confluence however. I"ll try upgrading everything. Thank you for your response!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add literal=false as a parameter on the hide macro. Default was literal to aid the novice user and mess up the advanced user :(.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bob. Thank you for the reply. If I can use literal that's fine, I was only trying with a regexp because the literal would not work. What I need to have happen is when the variable MyProject='aaa' the content is shown. Unfortunately the documentation for the macro does not provide an example of this parameter in use. I have tried the literal {hide:showIf=aaa:$MyProject} .... {hide} but that does not work. Could you please provide an example of using the showIf?
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.