Hi folks,
It's a great macro that you have here!
Other than hiding content, I also wanted to customize the Page Info because it is very crowded and looks complicated for normal users. Therefore I tried to hide some features there from users by implementing the macro inside the VM file, but it doesn't work, the macro simply showed up together with the code I wanted to hide.
Here's how I do it:
$helper.renderConfluenceMacro("{show-to:group=confluence-administrators}
<a href="viewpagesrc.action?pageId=$confPage.id" onclick="window.open(this.href, 'popupwindow', 'width=600,height=400,scrollbars,resizable'); return false;"><span class="label">$action.getText("view.source")</span></a>
{show-to}")
As far as I know the $helper.renderConfluenceMacro works for the other macros, but somehow not for the {show-to}.
Would be great if you guys can advise we how to do it correctly, or if it is currently not possible, to consider including it in your next release.