Tags:
create new tag
view all tags

Bug: Sitemap ignores site preferences

I need to be able to keep WEBBGCOLOR of a few webs in sync, so I assigned a default WEBBGOLOR in TWikiPreferences and specified a custom WEBBGCOLOR only in those webs that need their own (different) WEBBGCOLOR. This works fine, TWiki uses the WEBBGCOLOR definied in TWikiPreferences for all webs that don't have a WEBBGCOLOR defined in their WebPreferences (as documented).

In the sitemap, however, these webs are displayed on a black background, which is not quite the desired effect...

Test case

Remove the WEBBGCOLOR setting from the WebPreferences in one of your webs and check the sitemap.

Environment

TWiki version: 01 Feb 2003
TWiki plugins: none
Server OS: Linux
Web server: Apache 1.33
Perl version: 5.8
Client OS: Linux
Web Browser: Galeon

-- JohannesMartin - 25 Mar 2003

Follow up

I changed the previous "proper" way of extracting the web background color in the SiteMap for performance reasons: A $pattern(...) search in a FormattedSearch extracting the WEBBGCOLOR from a web is much faster then getting a variable value from a web using %VAR{"WEBBGCOLOR" web="$web"}%.

The performance loss does not matter if you have just a handful of webs, but it does if you have more then 50 or so webs.

TWiki has the WEBBGCOLOR defined in the WebPreferences by default, so the $pattern(...) search does always work in a standard TWiki installation.

You can use the %VAR{"WEBBGCOLOR" web="$web"}% search instead, which you probably want for your special case. How:

Replace:

  bgcolor=\"$pattern(.*?\* Set WEBBGCOLOR\s*=\s*([^\s]*).*)\"

With:

  bgcolor=\"%VAR{"WEBBGCOLOR" web="$web"}%\"

-- PeterThoeny - 26 Mar 2003

Fix record

No plan to fix since it works with the default installation.

-- PeterThoeny - 26 Mar 2003

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2003-03-26 - PeterThoeny
 
  • 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.