Foswiki on GitHub is open for business! Next release meeting: Monday September 15, 1300Z

Item4463: Template Path is wrong for Skin customization using topics

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Engine    
There has been considerable discussion regarding the TemplatePath. Historical information can be found at...

As a result prior focus on TemplatePath, it is now configurable. I'm currently working with our TWiki administrators to have our path changed; however, I believe the current TWiki TemplatePath is not quite right and should be updated as well.

Basically it seems that if there is a skin available, it should always be selected. This is not the case when a topic skin template is created. For example, SKIN = test. The $web.TestSkinViewTemplate is not selected because the /templates/view.tmpl is sooner in the search order. For those of us that do not have access to the /templates directory, but would like to use skins to customize a set of topics this creates a problem.

In TWiki-4.1.2 the TemplatePath is
$TWiki::cfg{TemplatePath} =
   '$TWiki::cfg{TemplateDir}/$web/$name.$skin.tmpl,
    $TWiki::cfg{TemplateDir}/$name.$skin.tmpl,
    $TWiki::cfg{TemplateDir}/$web/$name.tmpl,
    $TWiki::cfg{TemplateDir}/$name.tmpl,
    $web.$skinSkin$nameTemplate,
    $TWiki::cfg{SystemWebName}.$skinSkin$nameTemplate,
    $web.$nameTemplate,
    $TWiki::cfg{SystemWebName}.$nameTemplate';

I think the search order should be
$TWiki::cfg{TemplatePath} =
   '$TWiki::cfg{TemplateDir}/$web/$name.$skin.tmpl,
    $TWiki::cfg{TemplateDir}/$name.$skin.tmpl,
    $web.$skinSkin$nameTemplate,
    $TWiki::cfg{SystemWebName}.$skinSkin$nameTemplate,
    $TWiki::cfg{TemplateDir}/$web/$name.tmpl,
    $TWiki::cfg{TemplateDir}/$name.tmpl,
    $web.$nameTemplate,
    $TWiki::cfg{SystemWebName}.$nameTemplate';

If multiple skins have been specified, I would expect TWiki to search all possible skin locations for the first skin, before searching for subsequent skins (e.g. SKIN = test, pattern would still find $web.TestSkinViewTemplate instead of /templates/$web/view.pattern.tmpl).

Thanks, dB...

-- TWiki:Main/DonBowden - 17 Aug 2007

Bumping - no interest it seems.

-- TWiki:Main.SteffenPoulsen - 22 Dec 2007

I think this is related to Item5425 too.

-- TWiki:Main.SvenDowideit - 31 Mar 2008

ItemTemplate edit

Summary Template Path is wrong for Skin customization using topics
ReportedBy TWiki:Main.DonBowden
Codebase trunk
SVN Range TWiki-4.1.2, Fri, 10 Aug 2007, build 14536
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor
Checkins Foswikirev:1549 Foswikirev:1550
TargetRelease patch
ReleasedIn 1.0.0
Topic revision: r8 - 08 Jan 2009, KwangErnLiew
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License