Tags:
create new tag
view all tags

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.

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.

  • <other, anybody>

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. wink

-- 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

We overload the word Template, does the ambiguity confuse you?
Do you agree or disagree? Please select one of the radio buttons below and click the button.
I 1 - Strongly disagree   2 - Disagree   3 - am Neutral   4 - Agree   5 - Strongly Agree  


3 AntonAylward 02 Aug 2005 Yes we overload it, not it doens't confuse me. But you've worded this question badly.
1 LynnwoodBrown 14 Oct 2004  
1 WillNorris 14 Oct 2004  
4 PeterMasiar 14 Oct 2004  

Alternative terminology: What should they be called?

-- MartinCleaver - 02 Oct 2004

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2005-08-02 - AntonAylward
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.