Item4463: Template Path is wrong for Skin customization using topics
Priority: Normal
Current State: Closed
Released In: 1.0.0
Target Release: patch
Applies To: Engine
Component:
Branches:
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