In my skins I have come to rely on constructs like
$percntTMPL:P
, as in:
%TMPL:DEF{"breadcrumb:currentweb"}%%IF{"'%TOPIC%'!='WebHome' and $WEB!='%MAINWEB%'" then="$percntTMPL:P{$quotbreadcrumb:subweblink$quot}$percnt"}%%TMPL:END%
Unfortunately PublishContrib does not render these. Now my breadcrumbs are empty.
--
TWiki:Main/ArthurClemens - 23 Feb 2008
I had to change the above DEF into:
%TMPL:DEF{"breadcrumb"}%%TMPL:P{"breadcrumb:title"}%%IF{"'%TOPIC%'='WebHome' and '%WEB%'='Main'" then="Home" else="%TMPL:P{"breadcrumb:wikitoolname"}%%TMPL:P{"breadcrumb:currentweb"}%%TMPL:P{"breadcrumb:parents"}%%TMPL:P{"breadcrumb:currenttopic"}%"}%%TMPL:END%
So a number of things are different in the published topics:
- Variables are interpreted differently. Note the 'official'
$WEB
and the new %WEB%
.
-
$percntTMPL:P
does not work but %TMPL:P{
does. But this causes a lot of quoting troubles. Each included module must use single quotes. This is a pain, especially since out of the box syntax does not 'just work'.
--
TWiki:Main.ArthurClemens - 24 Feb 2008
The evaluation of %IF in a publish context is identical to evaluation in a view context, though of course the values it is evaluating may be different. And indeed, it appears that $WEB is evaluated differently to 'Bugs' - not sure why yet.
The standard escapes all work fine for me.
--
TWiki:Main.CrawfordCurrie - 27 Oct 2008