Hide a user-macro when page is included in another one

Benjamin DUPUIS April 21, 2017

Hi,

I use an user-macro to display a floatting toc (https://gist.github.com/Poil/dac77d2966491818dd898910754cc6da)

But when I include a page that have this user-macro, I don't want to have this macro displayed.

Is there anyway in a user-macro to detect if the current page is included in another one ?

Best regards

1 answer

0 votes
Benjamin DUPUIS April 21, 2017

Ok, I've got it

 

#if ($content.id == $globalHelper.getPage().id)
  ## my toc-right code
#end

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events