Tags:
create new tag
view all tags

Question

I'm try to create a master document that will include other sub documents if they exists, or have a button to create them if they don't.

(I'm doing this because I can't create the whole trree of documents in one go.)

The point I started off from was based on PeterThoeny's answer to LynnwoodBrown's question at ConditionalDisplayInTemplate

%CALC{"$IF($EXISTS(%TOPIC%Consequences),$NOP(%)INCLUDE{%TOPIC%Consequences}$NOP(%),$NOP(%)TOPIC$NOP(%)Consequences does not exist)"}%

Which doesn't seem to work as I expect. It says the topic dons't exist but it does. Am I short a few NOP's? Support/ConditionalDisplayInTemplate The next jump would be to a form with a button that created the relevant topic:

%CALC{"$IF($EXISTS(%TOPIC%Consequences),$NOP(%)INCLUDE{%TOPIC%Consequences}$NOP(%), <div style='float:right'> <form name='new' action='$NOP(%)SCRIPTURL$NOP(%)/edit$NOP(%)SCRIPTSUFFIX$NOP(%)/$NOP(%)WEB$NOP(%)/> <table> <tr> <td align='right'> <INPUT type='submit' value='Create Consequences'> <INPUT type='hidden' name='TopicType' value='Consequences'> <INPUT type='hidden' name='templatetopic' value='ConsequencesTemplate'> <INPUT type='hidden' name='parent' value='$NOP(%)TOPIC$NOP(%)'> </td> </tr> </table> <form> </div>)"}%

However this produces a file called > <td...

.....

Environment

TWiki version: TWikiAlphaRelease
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Mandrake 10.1
Web server: Apache 2
Perl version: 5.8.3
Client OS: Linux
Web Browser: Firefox
Categories: Forms

-- AntonAylward - 02 Aug 2005

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.

It seems that some functions behave differntly between Cairo and Dakar - see http://develop.twiki.org/~develop/cgi-bin/view/Bugs/Item190

-- AntonAylward - 03 Aug 2005

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2005-10-01 - 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.