Tags:
create new tag
view all tags
Replacing, for instance, templates/oopsauth.tmpl


%TMPL:DEF{"webaction"}% *Attention* %TMPL:END%
%TMPL:DEF{"heading"}%Either you need to register or the authentication failed%T
%TMPL:DEF{"message"}%
%INCLUDE{TWiki.OopsAuth}%
%TMPL:DEF{"topicaction"}%
  [[%WEB%.%TOPIC%][OK]] %TMPL:P{"sep"}%
  [[%TWIKIWEB%.TWikiRegistration][Register]] %TMPL:END%
%TMPL:P{"oops"}%

This means:

  1. You don't need to be logged in at the shell to change your templates
  2. You can revision control them
  3. You can see your changes straight away

But:

  1. We need to decide whether to retain the TWiki web

Thoughts?

-- MartinCleaver - 10 Oct 2003

I'd like to raise this one again, since taking over the CommentPlugin.

While the protections afforded by keeping templates in their own directory has some slight appeal, the fact that you can't include from a user-writable file is a real pain. It makes it impossible for people to define their own templates. This in turn means that we have to support a bunch of other complex mechanisms on top of the templating mechanism to take user prefs into account - and even then, they don't fully address the requirements. As a simple example, I have been asked oh-so-many-times to move forms from the bottom of the page to the top.

It would be MUCH nicer if templates could include topics from webs, as Martin suggests. This would open up a plethora of possibilities, such as per-user runtime-selectable skins, easier translation to languages other than English, and (importantly for the CommentPlugin) user-definable comment templates.

Going one step further, obviously there's a route here that would allow us to eliminate the templates directory completely over time viz. support %TMPL: macros in standard rendered topics; name skins SkinTopic. In light of this I can't see a good argument for maintaining templates in a separate templates directory (except reverse compatability). Can someone provide one?

Note that supporting %TMPL: macros in ordinary topics is tantamount to supporting named include sections - which are basically the same thing. %TMPL:P{fred}% in Web.Topic is really just the same as =%INCLUDE{"Web.Topic" section="fred"}% This is functionality which has been asked for on several separate occasions.

The end result would be: less code to support, eliminate duplicate code, extend user functionality, simplify maintenance for installer.

-- CrawfordCurrie - 25 Feb 2004

so you would not prefer RefactorOopsTemplates? (I'm tempted to lean towards one template per topic in a templates web too.)

when each seperate bit of information is distributed one to a topic, and you can use INCLUDES then you get lots of very nice stuff happening

-- SvenDowideit - 25 Feb 2004

No, I wouldn't. I think it's as much work to refactor the templates (and split them between templates and content in web) as it is to move all templates over to web content (and remove the templates dir).

I don't see why we should be restricted to one template per topic, either; it's probably more work to split them up (from where we are today) as it is to support named include sections.

The main problem is reverse compatability, for all those poor skin authors and other itinerant users of the templates dir.

-- CrawfordCurrie - 25 Feb 2004

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2004-02-25 - CrawfordCurrie
 
  • 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.