Hide page with velocity or groovy

How to hide page with velocity or groovy?


#set ($MyDoc = $xwiki.getDocument('BacASable.test2'))
#set ($MyDoc.hidden = true)

Strangely no need to save the doc and history didn’ t display the change…

Pascal B

See https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Scripting/APIGuide/#HMarkapageashidden (just added it)

You must save as otherwise your change is just in memory.

ha yes thanks you, I forgot this point.