On Wed, Aug 1, 2012 at 11:53 AM, Moritz Hesse <moritz.hesse(a)ea-gmbh.de> wrote:
Hi there,
I implemented a custom macro ( <http://pastebin.com/vUusmEtH>
http://pastebin.com/vUusmEtH) which works fine in general. It is based (and
requires) the Document Tree Plugin (
<http://extensions.xwiki.org/xwiki/bin/view/Extension/Document+Tree+Plugin>
http://extensions.xwiki.org/xwiki/bin/view/Extension/Document+Tree+Plugin)
and I took the sniplet found in
<http://extensions.xwiki.org/xwiki/bin/view/Extension/Children+Page+Tree>
http://extensions.xwiki.org/xwiki/bin/view/Extension/Children+Page+Tree.
This macro lists all children of the document where the macro is called.
When view access of a child document is restricted, then it doesn't display
the title of the child doc, but the code line:
$xwiki.getDocument($leaf.fullName).getDisplayTitle().
Is there a way to call the document title regardless of the view access
rights?
Imagine that you put sensitive information in a document title (like
the name of a secret prototype you're working on) and you restrict
view access to only your team. I'm sure you'd expect the answer to
your question to be "No".
The easiest is to display the document full name when you don't have
view rights. The alternative is to use programming rights:
#set ($xdoc = $xwiki.xWiki.getDocument("Sandbox.WebHome", $xcontext.context))
#set ($xhtmlSyntax = $syntaxFactory.createSyntaxFromIdString('xhtml/1.0'))
$xdoc.getRenderedTitle($xhtmlSyntax, $xcontext.context)
Hope this helps,
Marius
Thanks and bests,
Moritz
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users