Tags:
create new tag
view all tags

Question

If I use the %WEB% variable in a topic which I include in other topics, the value will be the web of the included topic and not the web of the topic which includes the other one. I would expect to get the web I'm currently navigating in.

  • TWiki version: 20001201
  • Web server: Apache
  • Server OS: Solatis 2.6

-- MatthiasLoepfe - 22 Jun 2001

Answer

The %WEB% variable points to the web of the topic where the variable is written. The latest Beta has in addition %INCLUDINGWEB% and %INCLUDINGTOPIC% variables that points to the web and topic of the originating topic that includes that topic. See details in TWikiVariables.

-- PeterThoeny - 23 Jun 2001

%WEB% is used instead of the Web name itself in text

  • if the web might get renamed
  • if the page might be moved
  • if the page was written to be used as a template
  • ...there are probably more reasons...

In the third case, it's much more apt to be included in a remote topic.

I think that %WEB% being the current web, and a variable referring to the original source web, say %SOURCEWEB% would map better to the problem space that the way it is now.

The way it is now, people thinking about designing a template need to type %INCLUDINGWEB% to always cover the case where it's included, rather than typing %SOURCEWEB% in the few times that that's what they actually mean.

... just my $0.02 ...

-- PaulReiber - 23 Jun 2001

SupportStatus:
AnsweredQuestions
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2001-06-23 - PaulReiber
 
  • 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.