How to hide the version of page for all pages or just for some of them? For example: Version <X.X> last modified by <username> on <date>?

Version 8.1 by Sergiu Dumitriu on 2013/03/21
Warning: For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

If you want to hide just the Last modified by... part, then edit templates/shortcuts.vm and comment out (using ##) the following lines:

  <div id="document-info">
##    <div class="xdocLastModification"> ## Last modification
##      $msg.get('core.footer.modification', [$xwiki.getUserName($tdoc.author), $xwiki.formatDate($tdoc.date)])
##    </div>
   <div>

If you want to hide both the version information and the shortcuts to comments, attachment and the others, then edit templates/layoutExtraVars.vm and add the following line at the end of the file (make sure it's outside the comment block delimited by #* and *#):

#set ($displayShortcuts = false)

However, it is not recommended to modify the templates on the filesystem, since this makes upgrades harder. The recommended way of overriding a template is to create and activate a custom skin and attach the modified files to it.

You can set this $displayShortcuts variable in a document, to hide this information just for that document. To do this, add #set ($displayShortcuts = false) in a Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:FAQ.HowToHidePageVersion]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

Get Connected