• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5388: Nested templates are not published

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension PublishContrib Normal Closed TWiki:Main.CrawfordCurrie n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


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

Summary Nested templates are not published
ReportedBy TWiki:Main.ArthurClemens

SVN Range TWiki-5.0.0, Wed, 23 Jan 2008, build 16283
AppliesTo Extension
Component PublishContrib
Priority Normal
CurrentState Closed
WaitingFor TWiki:Main.CrawfordCurrie
Checkins TWikirev:17708 TWikirev:17709
TargetRelease n/a

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r7 - 2010-10-12 - PeterThoeny
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback