cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
You are here: Foswiki>Tasks Web>Item4463 (08 Jan 2009, KwangErnLiew)Edit Attach

Item4463: Template Path is wrong for Skin customization using topics

pencil
Priority: Normal
Current State: Closed
Released In: 1.0.0
Target Release: patch
Applies To: Engine
Component:
Branches:
Reported By: TWiki:Main.DonBowden
Waiting For:
Last Change By: KwangErnLiew
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 distro:db1097524a65 distro:9ed873a7dc5c
TargetRelease patch
ReleasedIn 1.0.0
Topic revision: r8 - 08 Jan 2009, KwangErnLiew - This page was cached on 27 May 2018 - 00:28.

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