-<TMPL_LOOP NAME="PAGES">
-<TMPL_IF NAME="DIFFURL">
-<a href="<TMPL_VAR DIFFURL>">
-<img alt="diff" src="<TMPL_VAR BASEURL>wikiicons/diff.png" />
-</a><TMPL_VAR LINK>
-<TMPL_ELSE>
-<TMPL_VAR LINK>
+<TMPL_UNLESS HAS_DIFFURL>
+<TMPL_IF DIFF>
+<a href="#diff-<TMPL_VAR REV>" class="toggle" title="diff" rel="nofollow">[[diff|wikiicons/diff.png]]</a>