Hello,
my setup is: XWiki 2.0 milestone 3, GlassFish, Windows XP
how can I make my XWiki execute a macro for every page rendered? In
other words: I hoped to get a TOC on every single page when I edited
templates\view.vm in the following way:
###
### Main "view" template
###
### General wrapper for view actions
###
#if ($request.getParameter("raw").equals("1"))
#template("code.vm")
#else
#template("startpage.vm")
#if((!$viewer) || ($viewer == ""))
#set($viewer = $request.getParameter("viewer"))
#end
#if((!$viewer) || ($viewer == ""))
#set($viewer = "view")
#end
#if($viewer == "view")
<div class="minwidthb"></div>
<div class="main layoutsubsection">
#template("contentview.vm")
#template("docextra.vm")
<div class="clearfloats"></div>
#else
<div class="main layoutsubsection">
#template("${viewer}.vm")
<div class="clearfloats">
</div>
#end
#toc("2", "6", "true", "page")
</div>## main
#template("endpage.vm")
#end
This is the original view.vm with an additional #toc ... near the end.
Unfortunately, this has no (visible) effect.
Any ideas?
Best regards
Philippp