Question
Q: how do I create a template in a TWiki topic?
The page
TWiki.TWikiTemplates seems to imply that you can create a template in at least two ways:
- in a template file in the twiki/templates directory
- or, in a user topic
I have been able to create a twiki/template file.
try as I might, I have not been able to create a template in a user topic.
My goal: I want to put the form for a twiki page at the top of the page when it is viewed, not at the bottom. (This is also posed as a Support question,
HowToPlaceFormAtTopOfPage.)
I have tried
- creating a topic ViewTemplate in the web in question b. adding said topic to VIEW_TEMPLATE in WebPreferences in the web in question
etc.
I want to put the format in a topic, rather than separately in a template, so that other members of my project, who do not have access to the filesystem that holds twiki/templates, can change the form used in the issue tracking system.
the problem seems to be that the skin template takes precedence over the VIEW_TEMPLATE topc in a web. And, since whoever installed my twiki had a default skin installed (
PatternSkin - maybe this was installed by default), no users will ever see the web specific view template.
One can always create a skin specific web view template: data/%!WEB%/!SkinSkinScriptTemplate.txt. However, if your users use many different skins, as mine do, this is unreasonable: it is unreasonable for the owner of a web to have to know about every skin that a user may be using.
IMHO this points out a significant problem with the templates and skin system: it effectively says that there is no way for a web admin to influence the order of objects displayed on a page. Note that I said "influence', not control. I do not care if a user explicxitly says "I want the form to always go at the bottom" - let him.
But if the user says "give me the default", I would prefer to give him or her the default for the page or web.
I.e. in priority order from lowest to highest
- site default
- web default
- page default
- skin default
- web/page default overriding skin
- skin default overriding anything above
I have seen trhe notion of "strength" be applied to defaults. The strongest strength wins. Strengths are FP numbers.
Environment
--
AndyGlew - 10 Oct 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Sorry, closing after more than 30 days...
--
PeterThoeny - 01 Dec 2006