Tags:
create new tag
view all tags

SID-00419: How to hide variable definition in Topic

Status: Answered Answered TWiki version: 4.0.5 Perl version: 5.10.0
Category: CategoryVersionControl Server OS: Linux 2.6.27.23 Last update: 17 years ago

1. I create a topic having a variable definition (revision 1):

  • Set SERVICE = A

%SERVICE% Todo List

2. To hide the variable definition, I add an html comment (revision 2):

<!--

  • Set SERVICE = B
-->

%SERVICE% Todo List

3. I change my variable from B to C (revision 3):

<!--

  • Set SERVICE = C
-->

%SERVICE% Todo List

4: Result, the historic between revision 2 and 3 is lost. Both revision have now the last definition:

Questions: Is it normal? How can I hide the section where I defined variables used by the all topic? If a defined it as a section, I will not be possible to INCLUDE it in an other topic. Normal?

Thank's JM

-- TWikiGuest - 2009-07-15

Discussion and Answer

Variables defined at topic level have effect only on that topic. That is, old values in topic history have no effect when looking at an older revision, and variables in included topic have no effect.

If you want variables to take effect over several topics define it in the WebPreferencs of that web, or in the site-wide Main.TWikiPreferences.

Alternatively, you can use SpreadSheetPlugin variables ($SET ,=$GET=), they retain old value in history. They also can be changed several times within a page (top to bottom), and across included topics. See for example SpreadSheetRollupTest.

-- PeterThoeny - 2009-07-16

Peter, thank's for your help. I tested your solution with the SpreadSheetPlugin, and it works. JM

-- TWikiGuest - 2009-07-16

      Change status to:
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.
SupportForm
Status Answered
Title How to hide variable definition in Topic
SupportCategory CategoryVersionControl
TWiki version 4.0.5
Server OS Linux 2.6.27.23
Web server Apache 2.2.10
Perl version 5.10.0
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2009-07-16 - TWikiGuest
 
  • 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.