• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Some pattern templates may be shortened considerably by including classic skin templates in a more intelligent way. Even more so, classic skin templates should include functionality from base templates, and only do the depicting of page elements.

backlinks.pattern.tmpl for instance recreates all functionality that is also present in backlinks.tmpl.



%TMPL:DEF{"windowtitle"}%<title>%TMPL:P{"titleaction"}%<nop>%TOPIC% %TMPL:P{"titlesep"}% %WEB% %TMPL:P{"titlesep"}% <nop>%WIKITOOLNAME%</title>%TMPL:END%

%TMPL:DEF{"searchweb"}%%SEARCH{ search="%TOPIC%([^A-Za-z0-9]|$)|%SPACEOUT{"%TOPIC%" sep=" *"}%([^A-Za-z0-9]|$)|%WEB%.%TOPIC%([^A-Za-z0-9]|$)" type="regex" scope="text" nosearch="on" excludetopic="%TOPIC%" web="%WEB%" }%%TMPL:END%

%TMPL:DEF{"searchallwebs"}%%SEARCH{ search="%WEB%.%TOPIC%([^A-Za-z0-9]|$)|%WEB%.%SPACEOUT{"%TOPIC%" sep=" *"}%([^A-Za-z0-9]|$)" type="regex" scope="text" nosearch="on" excludetopic="%TOPIC%" web="all,-%WEB%" }%%TMPL:END%

Could be shortened to:


%TMPL:DEF{"windowtitle"}%<title>%TMPL:P{"titleaction"}%<nop>%TOPIC% %TMPL:P{"titlesep"}% %WEB% %TMPL:P{"titlesep"}% <nop>%WIKITOOLNAME%</title>%TMPL:END%

Even classic skin's backlinks.tmpl should actually have functionality removed, and only leave in the painting of page elements.

So %TMPL:DEF{"searchweb"}% for instance should be put in a "base.backlinks.tmpl= file, and both classic skin and pattern skin should include this.

I was thinking of this structure of templates:
  • backlinksbase
    • backlinks (classic)
    • backlinks.pattern (obsolete because empty)
    • backlinkswebbase
      • backlinksweb (classic)
      • backlinksweb.pattern
    • backlinksallwebsbase
      • backlinksallwebs (classic)
      • backlinksallwebs.pattern

I've attached the files here because I feel there first need to be consensus before I commit them to SVN.

-- AC

Hm, as far as I browse your templates this is the template structure:

  • search
  • backlinksbase
    • backlinks
      • backlinkswebbase
        • backlinksweb, backlinksweb.pattern
      • backlinksallwebsbase
        • backlinksallwebs, backlinksallwebs.pattern

where an indentation level means recursive inclusion, the same level means serial inclusion and comma separation means overloading via the skin search path (inclusion hierarchy above search is not shown here).

Looking at the diagram backlinkswebbase, backlinksallwebsbase and backlinks seem to be obsolete. The backlinksweb.pattern and backlinksallwebs.pattern templates already overload backlinksweb and backlinksallwebs respectively. The only thing they define is the titleaction. This can be moved to backlinksweb/backlinksallwebs afaik and eliminate two templates. The extra inclusion level introduced by backlinks is not giving any added value as there is no template on the same level. So backlinks can be merged into backlinksbase eliminating another template This is the final structure then:

  • search
  • backlinksbase
    • backlinksweb, backlinksweb.pattern
    • backlinksallwebs, backlinksallwebs.pattern

The same thing can be achieved with 3 instead of 6 backlinks templates obviously.

-- MD

Changes would be too invasive for Dakar. Deferring. CC

Undeferred, post Dakar CC

Arthur and Michael have tracked this elsewhere, so I'm discarding it.


Summary Restructure templates
ReportedBy ArthurClemens

SVN Range

AppliesTo Engine

Priority Normal
CurrentState No Action Required


TargetRelease n/a
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formattmpl backlinks.tmpl r0 manage 0.3 K 2005-09-06 - 12:35 ArthurClemens  
Unknown file formattmpl backlinksallwebs.pattern.tmpl r0 manage 0.5 K 2005-09-06 - 12:35 ArthurClemens  
Unknown file formattmpl backlinksallwebs.tmpl r0 manage 0.4 K 2005-09-06 - 12:33 ArthurClemens  
Unknown file formattmpl backlinksallwebsbase.tmpl r0 manage 0.1 K 2005-09-06 - 12:34 ArthurClemens  
Unknown file formattmpl backlinksbase.tmpl r0 manage 0.4 K 2005-09-06 - 12:34 ArthurClemens  
Unknown file formattmpl backlinksweb.pattern.tmpl r0 manage 0.5 K 2005-09-06 - 12:34 ArthurClemens  
Unknown file formattmpl backlinksweb.tmpl r0 manage 0.4 K 2005-09-06 - 12:33 ArthurClemens  
Unknown file formattmpl backlinkswebbase.tmpl r0 manage 0.1 K 2005-09-06 - 12:34 ArthurClemens  
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r10 - 2006-04-14 - CrawfordCurrie
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback