You are here: Foswiki>Tasks Web>Item5388 (18 Dec 2010, ArthurClemens)Edit Attach

Item5388: Nested templates are not published

pencil
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: PublishPlugin
Branches:
Reported By: TWiki:Main.ArthurClemens
Waiting For:
Last Change By: ArthurClemens
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 PublishPlugin 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

I recall addressing something like this in the recent changes; can you please check again and see if there's still a problem? AFAIK the plugin should behave exactly like a view of the topic with the given skin (that's all it really is, when it comes down to it)

-- CrawfordCurrie - 04 Dec 2008

Problem fixed.

-- ArthurClemens - 18 Dec 2010

ItemTemplate edit

Summary Nested templates are not published
ReportedBy TWiki:Main.ArthurClemens
Codebase
SVN Range TWiki-5.0.0, Wed, 23 Jan 2008, build 16283
AppliesTo Extension
Component PublishPlugin
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
Topic revision: r5 - 18 Dec 2010, ArthurClemens - This page was cached on 09 Jun 2017 - 05:17.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License