Tags:
create new tag
view all tags

Question

A couple of questions on master templates vs. topic templates...

1. I was able to create and edit WebTopicViewTemplate on a team web, but not in main. It allowed me to create the topic and appears in the index on main, but when i open it, I get a 'This topic does not exist' error. I cannot create it again because I get the error 'This topic already exists'. Is this a bug or am i not meant to manage template topics in main? I want to customize templates for all webs so that that they are not overwritten on upgrade. Normally I'd do something like this in Main. Main is not specifically mentioned in the search order in TWikiTemplates - does this mean I have to copy a template to each web?

2. In TWikiTemplates, the order of template searches is template directories, thisweb, TWiki. Having overriden WebTopicViewTemplate on a team web already, I assume that the search is from top to bottom and stops when the first template is found. This implies that I cannot in fact override a master template in the template directory, with a topic template (assuming that is even possible - that's question 3), without removing the associated template from the template directory.

3. I was hoping that I could create and manage all master templates within topics, in the same way comments and web topic view are. I've experimented with variations on new topics names, based on master template + skin names, thinking I could get a topic to override an existing master template in template directory. Can this not be done, or is the problem the search order, as per question 2?

Environment

TWiki version: TWikiRelease04x01x01
TWiki plugins:  
Server OS: RHEL3 01, kernel 2.4.21
Web server:  
Perl version: 5.8
Client OS:  
Web Browser:  
Categories:  

-- MichelleAlbertin - 16 Aug 2007

Answer

ALERT! 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.

Ok, we're getting the templates in web topics recognized now by changing the template path ordering in configuration settings, so that it looks in the web first and then templates dir. Any reason we should not be doing this and any reason we shouldn't put main in the template path as well, to consolidate templates for all webs? I am also still wondering about the problem mentioned in question 1 if anyone can shed some light.

-- MichelleAlbertin - 16 Aug 2007

On your question 1: Most probably you know the belgian artist Rene Magritte? In one of his most famous pictures he shows a pipe, and below that the sentence "Ceci n'est pas un pipe" (this is not a pipe). The sentence is true, because what you see is not a pipe, but the image of a pipe.

In a similar fashion you have been fooled by the purpose, and hence by the contents, of WebTopicViewTemplate. The purpose of this topic is to be displayed if a topic does not exist. If you view it directly, you get the impression that it wouldn't exist, but well, of course it does. Just click the "Raw View" at the bottom of the page.

Admittedly, TWikiTemplates are a bit difficult to understand, the documentation is lengthy, and maybe the some names are a bit misleading. In TWiki.TWikiTemplates#Template_Topics you see a table of the "special" topics which have nothing to do with how a template is viewed (layout templates) , but define topic content templates.

-- HaraldJoerg - 17 Aug 2007

Closing this after more than 30 days of inactivity. Please feel free to reopen the question.

-- PeterThoeny - 03 Oct 2007

I want to detail the answer of michel which helped me:

  1. the modification occurs in config script bin/configure,
  2. choose Miscellaneous settings
  3. edit {TemplatePath}: instead of

/var/www/twiki-cdmi/templates/$web/$name.$skin.tmpl,
/var/www/twiki-cdmi/templates/$name.$skin.tmpl,
/var/www/twiki-cdmi/templates/$web/$name.tmpl,
/var/www/twiki-cdmi/templates/$name.tmpl,
$web.$skinSkin$nameTemplate,
TWiki.$skinSkin$nameTemplate,
$web.$nameTemplate,
TWiki.$nameTemplate
put
$web.$nameTemplate,
/var/www/twiki-cdmi/templates/$web/$name.$skin.tmpl,
/var/www/twiki-cdmi/templates/$name.$skin.tmpl,
/var/www/twiki-cdmi/templates/$web/$name.tmpl,
/var/www/twiki-cdmi/templates/$name.tmpl,
$web.$skinSkin$nameTemplate,
TWiki.$skinSkin$nameTemplate,
TWiki.$nameTemplate

-- RichardHitier - 14 Nov 2007

Change status to:
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-11-14 - RichardHitier
 
  • 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.