Backlinks Snippet

Shows all the wiki links leading to the page in which this snippet is located. Backlinks need to be activated using xwiki.backlinks=1 in xwiki.cfg for this script to work (they are activated by default).

Code

#set ($links = $doc.getBacklinks())
#if ($links.size > 0)
  #foreach($docname in $links)
    #set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument())
    * <a href="$rdoc.getURL("view")">$rdoc.displayTitle</a>
  #end
#else
  No back links for this page!
#end

Result

No back links for this page!

Version 3.1 last modified by VincentMassol on 09/12/2007 at 13:35

Comments 0

No comments for this document

Attachments 0

No attachments for this document

Creator: VincentMassol on 2006/12/10 21:51
This wiki is licensed under a Creative Commons license
1.4.1.10194