The Term Template Means different things in different contexts
First of all, the term 'template' seems a bit overloaded.
The following distinction might help to clarify the situation:
- LayoutTemplate
- the stuff living in .../twiki/templates determines the rendering of all pages, including the following templates:
- ContentTemplate
- a skeleton for editing a page; passed via templatetopic parameter to the edit script; typically you leave the global default in the TWiki web alone and add some more as you define forms, cf DynamicEditTopicTemplate. These are kept as regular topics.
- PageTemplate
- a functional page delivered with twiki, normally needs no customisations. Some are kept as regular topics, some as oops*.tmpl files
Ad everything should be a topic:
The role of the
LayoutTemplates is so much different,
that I think it is a good thing to keep them separate
for several reasons:
- actually, regular files are easier to upgrade than twiki topics, because these carry along their own rcs history and user lock.
- same for tracking changes: its trivial cvs'ing your bin/lib/template directories compared to the individual RCS files of the topics
- what is good for content - instant change, instant visibility - is not so good for critical layout, spread over many pages: developing, testing and deploying new LayoutTemplates is easier, when you can switch them in one go from the shell. BTW: in this context, I feel TWiki already has too many %FOO %BAR settings spread all over the place.
- security
The
ContentTemplates belong where they are: in their webs.
The
PageTemplates, I'd slightly prefer the .../templates dir.
2¢
PeterKlausner - 21 May 2003
"Templates" is overloaded in TWiki — there are at least two things called templates (there may be a third, but I can't recall it at the moment).
I will call them content templates and view templates.
WebTopicEditTemplate is (mostly) about content.
For some pages on view templates, try
TWiki.TWikiTemplates and
Codev.ViewTemplateModification (just to expose you to some discussion about the view templates).
Sorry, I can offer only a little insight into the difference between a skin and a view template:
- View templates affect the "base" appearance of a site but that base appearance can be overridden by a skin by using a parameter in the URL (something like ?...skin=Caboteria)). (I'm sure there is a way to make a skin be the base appearance of the site, without specifying it in the URL, but as I've never tried it, I can't tell you how.
Thus, even if you specify a specific base appearance via view templates or via a "base" skin, if you have other skins installed, anyone can view the site with any of those installed skins by specifying it in the URL — maybe it can also be specified as a personal preference on each users home page (I [have never tried | don't know]).
--
RandyKramer - 30 Aug 2003
Thanks, Randy.
Yes,
template is a bit overloaded. There is also a Web Template, the
_default content that is copied to new webs, similar to the default content for a new page.
For now, I think I'll start with a base set of view/edit templates, or
HTML page templates, since this is easy to understand. In the future, I could package it as a skin and sell it for $2.
--
DavidKing - 29 Aug 2003
I don't think the issue is overusing the term "template" per se. Looking at
Google:define:+template
, all of our uses are true to the basic meaning of the term. What
would be helpful is clarifying our termilogy for the different
types of templates TWiki uses. So I disagree with the premise of this topic's name (and the poll below) but think the discussion is important.
So I'd like to see the discussion continue about listing the different types of templates used in TWiki and what we call them. Most of the ones listed above makes sense to me except
PageTemplate. I'm not clear what that refers to. And there aren't really that many. It seems to me that it would be
more confusing to come up with completely different names then simply adding descriptors to the word template.
BTW, as a poll-process comment, the poll question below, besides being simply bad grammer, crams two totally different thoughts together one so I'm not really sure what's being asked. Plus, the agree-disagree scale doesn't really match the question. Why not just keep it simple and consistent with the topic name, like "Do you think the word "template" is overloaded and that we should come up with other terms?"
--
LynnwoodBrown - 14 Oct 2004
Alternative terminology: What should they be called?
--
MartinCleaver - 02 Oct 2004