Really dumb newbie question
This one is so dumb you'll be laughing, but any help would be greatly appreciated. I need to evaluate an IF. That's all. I have a variable called Action that's a string, and it can be null, "Add", "Update" etc. I try something along the lines of: <dtml-if action == "add"> blah </dtml-if> and whatever I try, I get "Invalid attribute name, "action", for tag <dtml-if Action=="add">" Assuming that I'm not just cursed by the Zope Gods, what am I doing wrong? Yeesh, I feel dumb. ---------------------- Andy Gates, Learning and Research Technology Andy.Gates@bristol.ac.uk - ICQ#74362415
Message-ID: <EXECMAIL.1000524090650.C@kosh.bris.ac.uk> Priority: NORMAL X-Mailer: Execmail for Win32 5.1 Build (9) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Thanks folks :) ---------------------- Andy Gates, Learning and Research Technology Andy.Gates@bristol.ac.uk - ICQ#74362415
At 5:01 pm +0100 23/5/00, Andy Gates wrote:
This one is so dumb you'll be laughing, but any help would be greatly appreciated.
I need to evaluate an IF. That's all. I have a variable called Action that's a string, and it can be null, "Add", "Update" etc.
I try something along the lines of: <dtml-if action == "add"> blah </dtml-if>
<dtml-if "action == 'add'"> blah </dtml-if> As an aside, whenever anything is in " .. " - it becomes a Python expression. hth Tone ------ Dr Tony McDonald, FMCC, Networked Learning Environments Project http://nle.ncl.ac.uk/ The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2
At 05:01 PM 5/23/00 +0100, you wrote:
This one is so dumb you'll be laughing, but any help would be greatly appreciated.
I need to evaluate an IF. That's all. I have a variable called Action that's a string, and it can be null, "Add", "Update" etc.
I try something along the lines of: <dtml-if action == "add"> blah </dtml-if>
Just try: <dtml-if "action == 'add'"> Inside the " " is a python expression that is evaluated and returns true or false. In case you do not know Python, I would suggest you learn the basic logic, since in Zope all expressions " " are evaluated as Python syntax expressions. Regards, Stephan -- Stephan Richter CBU - Physics and Chemistry Web2k - Web Design/Development & Technical Project Management
Andy Gates writes:
This one is so dumb you'll be laughing, but any help would be greatly appreciated.
I need to evaluate an IF. That's all. I have a variable called Action that's a string, and it can be null, "Add", "Update" etc.
I try something along the lines of: <dtml-if action == "add"> blah </dtml-if>
and whatever I try, I get "Invalid attribute name, "action", for tag
Try: <dtml-if "Action=='add'">" All my best, Jason Spisak CIO HireTechs.com 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
participants (6)
-
Andy Gates -
Chris Withers -
Christopher J. Kucera -
Jason Spisak -
Stephan Richter -
Tony McDonald