To set a template you need to provide an explicit web now which should not be needed.

Does not work:
   * Set VIEW_TEMPLATE = TestTopic33

Works as expected:
   * Set VIEW_TEMPLATE = Sandbox.TestTopic33

Example: http://trunk.foswiki.org/Sandbox/TestTopic34

-- AndreUlrich - 17 Jun 2009

can someone please confirm this bug under 1.0.5? if it is broken in 1.0.5, it really should be fixed before 1.0.6 is released.

this does work in 1.0.0--1.0.4. (1.0.0: http://foswiki.org/Sandbox/TestTopic34 )

i have tested with a 1.0.4 installation, and it works without the webname whether specified by

% META:PREFERENCE{name="VIEW_TEMPLATE" title="VIEW_TEMPLATE" type="Set" value="ThingView"}%

(like in http://community.reefsimple.com/Reefapedia/Thing2 )

or

   * Set VIEW_TEMPLATE = EquipmentView

(like in http://community.reefsimple.com/Reefapedia/Equipment1#support , temporarily, for testing this)

-- WillNorris - 17 Jun 2009

There is no difference between 1.0.0 and our current 1.0.6 code. They both behave the same.

If you use the fully qualified name the example works. And if you use the naked topic name is does not work as you think it works. But it also works. There is no bug.

The reason is that VIEW_TEMPLATE and any other template follows a set of rules how to find a template.

When you say Set VIEW_TEMPLATE = TestTopic33 is will actually try to find a topic called SkinNameTestTopic33Template

and if this is not found it tries TestTopic33Template and then it gives up.

The rule is more complex as it actually searches in different places.

It is documented in SkinTemplates.

If you look at SkinTemplates you see the rules and you see this

  1. templates/web/script.skin.tmpl for each skin on the skin path
    • ALERT! this usage is supported for compatibility only and is deprecated. Store web-specific templates in topics instead.
  2. templates/script.skin.tmpl for each skin on the skin path
  3. templates/web/script.tmpl
    • ALERT! this usage is supported for compatibility only and is deprecated. Store web-specific templates in topics instead.
  4. templates/script.tmpl
  5. The topic aweb.atopic if the template name can be parsed into aweb.atopic
  6. The topic web.SkinSkinScriptTemplate for each skin on the skin path
  7. The topic web.ScriptTemplate
  8. The topic %SYSTEMWEB%.SkinSkinScriptTemplate for each skin on the skin path
  9. The topic %SYSTEMWEB%.ScriptTemplate
Legend:

So with the fully qualified name the match is "The topic aweb.atopic if the template name can be parsed into aweb.atopic"

And with the simple naked topic name it reaches to the bottom without a match.

If you want it to match also naked topics I guess you can add it to your path in configure.

But I would follow the standard rule and simply define my Template topics with suffix "Template". Then you also know that it is a template topic.

No this is a No Action

-- KennethLavrsen - 19 Jun 2009

It may be processed correctly then. But if even long time Foswiki users like Will and I are irritated by this then there is something wrong.

just my 2 cents

-- AndreUlrich - 19 Jun 2009

I agree

you should consider ammending the default template search path with the naked topic name placed at the end.

There is a risk that it can break things so we need to think it through. So scope should be 1.1. The 1.0.6 release Sunday is too close.

Raise a feature request with yourself as developer.

-- KennethLavrsen - 19 Jun 2009

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads