DTML Zope (element of list?)

  • Thread starter Holger Butschek
  • Start date
H

Holger Butschek

Hy folks,

I have a problem in Zope (DTML).

I know, that it's a very simple problem, but I'm quite new to Zope.

I want to check, if a sequence-item of a sql-statement is in a list called
groupsSW (this list might or might not be given by URL from a previous
window).

Therefor, I have following code designed. I know that it doesn't work this
way:

<dtml-in "sqlSchlagwort(SCHLAGWORT=SCHLAGWORTSTR)">
<table id="AutoNumber1" style="BORDER-COLLAPSE: collapse"
borderColor="#111111" cellSpacing="0" cellPadding="3" width="60%"
border="0">
<tr <dtml-if sequence-even>bgcolor="#CCCCCC"</dtml-if>>
<td width="10%"><input type="checkbox" name="groupsSW:list"
value="&dtml-PIDSCHLAGWORT;:&dtml-SCHLAGWORT;" <dtml-if
"&dtml-PIDSCHLAGWORT;:&dtml-SCHLAGWORT; in
groupsSW()">checked</dtml-if></td>
<td width="45%" align="left">
<dtml-var SCHLAGWORT>
</td>
</tr>
</table>
<dtml-else>
- keine Einträge vorhanden -
</dtml-in>

If the element is in the list, then I want it CHECKED.

Please help me.

Holger Butschek
 
L

Lee Harr

Hy folks,

I have a problem in Zope (DTML).

I know, that it's a very simple problem, but I'm quite new to Zope.

I want to check, if a sequence-item of a sql-statement is in a list called
groupsSW (this list might or might not be given by URL from a previous
window).
<dtml-if "&dtml-PIDSCHLAGWORT;:&dtml-SCHLAGWORT; in
groupsSW()">checked</dtml-if>
If the element is in the list, then I want it CHECKED.


You will probably want to ask this question on the (e-mail address removed)
mailiing list. That is the best place for any and all zope questions.


The code in quotes needs to be a python statement. The way I read this
you are going to end up with something like ...

6:'foo' in groupsSW()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,228
Latest member
MikeMichal

Latest Threads

Top