DTML Zope (element of list?)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Holger Butschek

    DTML Zope (element of list?)

    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=SCHL AGWORTSTR)">
    <table id="AutoNumber1 " style="BORDER-COLLAPSE: collapse"
    borderColor="#1 11111" cellSpacing="0" cellPadding="3" width="60%"
    border="0">
    <tr <dtml-if sequence-even>bgcolor="# CCCCCC"</dtml-if>>
    <td width="10%"><in put type="checkbox" name="groupsSW: list"
    value="&dtml-PIDSCHLAGWORT;: &dtml-SCHLAGWORT;" <dtml-if
    "&dtml-PIDSCHLAGWORT;: &dtml-SCHLAGWORT; in
    groupsSW()">che cked</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

    --
    Erstellt mit M2, Operas revolutionärem E-Mail-Modul:
    Opera is a secure, innovative browser used by millions around the world with a built-in ad blocker, free VPN, units converter, social messengers, battery saver and much more - all for your best browsing experience. Download Opera browser now and enjoy the Internet once again. Want to know more? Visit opera.com and discover yourself.

  • Lee Harr

    #2
    Re: DTML Zope (element of list?)

    On 2004-06-04, Holger Butschek <holger@butsche k.com> wrote:[color=blue]
    > 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).
    >[/color]
    [color=blue]
    > <dtml-if "&dtml-PIDSCHLAGWORT;: &dtml-SCHLAGWORT; in
    > groupsSW()">che cked</dtml-if>[/color]
    [color=blue]
    > If the element is in the list, then I want it CHECKED.
    >[/color]


    You will probably want to ask this question on the zope@zope.org
    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()


    Comment

    Working...