[Zope] newbie DTML namespace

Brad Moulton brad@netarchitects.com.au
Thu, 27 Jul 2000 15:51:57 +1000


Hi all,

as a newbie to both python and zope i am struggling with understanding the
howto and the syntax of accessing stuff in namespace

eg

I would like to build a table depending on some tests peformed on stuff
returned form a Z SQL method

1. I have a form with a name="spam" value="egs"
this value is passed onto next dtml document
---------------------------------
table
<tr>
<td><dtml-var spam> <td>		// displays 'eggs'  to test spam is OK
</tr>
<dtml-var sqlstuff>			// this does a join of two tables 
<dtml-in sqlstuff>
<dtml-if {CAN'T WORK OUT SYNTAX TO ACCESS  spam to compare with lets say
sqlstuff.spam}
<tr><td><dtml-var sqlstuff.column></td>....etc
</dtml-if>
</dtml-in>  
----------------------------------------------
I have read DTML  Reference but dtml-if says "a valid python expression"
Can I still access spam inside the dtml-in if so how <dtml-var spam>, spam
'spam', ['spam']
and then how do i refer to a table column name returned in the SQL
query  to make the comparison 

TIA
brad