Tags:
create new tag
view all tags

Question

Is there a way to consolidate multiple lines which contain their own TWikiVariables into a single variable ?

wouldn't it be nice if I could set

%CHECKLIST% =

%EDITTABLE{changerows="add" editbutton="add TO-DO" format="|  label, 0, %CLI%  | text, 30 | text, 50 |"}%  %BR%
| *Status* | *To Do* | *Comment* |

or

%ACCOUNTLEDGER% =

%EDITTABLE{changerows="add" editbutton="add line item" quietsave="off" format="| text, 20 | text, 10 | text, 10 | label, 0, $percntCALC{ $percntBALANCE$percnt }$percnt |"}%  %BR%
| *Item* | *Debit* | *Credit* | *Balance* |

The goal of this question is to make is easy for non-programmers to add simple TWikiApplications to their topics by consolidating a few lines of code into a single TWikiVariable

Below are two examples that I would like to boil down into a single variable. They're both MashUps of the EditTablePlugin (one with the SpreadSheetPlugin and the other with the ChecklistPlugin).

Since both of them produce self-sufficient tables, I'd like to make it very easy for my users to add tables like these to their topics (as easy as dropping a single variable into the topic).

Environment

TWiki version: TWikiRelease04Sep2004
TWiki plugins: tons and tons
Server OS: SuSe pro 9.3
Web server: apache
Perl version: 5.8.6
Client OS: windoze xp pro
Web Browser: firefox
Categories: Plugins

-- KeithHelfrich - 16 Dec 2006

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.

Dakar Test Case

Define Variables

I have a sneaking suspicion that this is only broken on CairoRelease and that it will work correctly here on TWikiDotOrg.

  • Set CHECKLIST =
Status To Do Comment
%CLI% upgrade to DakarRelease waiting on KoalaSkin

  • Set ACCOUNTLEDGER =
Item Debit Credit Balance
Stick of Gum .99   %BALANCE%

Test Variables



Yes, as I suspected: this is working fine here at TWikiDotOrg. It's only on CairoRelease that it is broken for me. Though, I notice that here in the test case, the table in the Set command gets updated instead of the one in the variable. No problem, though, because in real life the Set command would be located in TWikiPreferences.

I've got to upgrade to DakarRelease!

-- KeithHelfrich - 18 Dec 2006

Change status to:
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2006-12-18 - KeithHelfrich
 
  • 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-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.