Edgewall Software

Opened 17 years ago

Closed 17 years ago

#208 closed enhancement (duplicate)

Support for <py:else> and <py:elif>

Reported by: anonymous Owned by: cmlenz
Priority: minor Milestone:
Component: Template processing Version: 0.4.4
Keywords: Cc:

Description

Maybe I'm not the first one to suggest it, but I would like to see support for "else" and "elif". I think syntactically it should work out. For me it seems to be more intuitive like the "choose" construct. Example:

<div py:if="a">
    <div py:if="c">
        xxx
    </div>
    <div py:else="">
        xxx
    </div>
</div>
<div py:elif="b">
    xxx
</div>
<div py:else="">
    xxx
</div>

Change History (1)

comment:1 Changed 17 years ago by cmlenz

  • Component changed from General to Template processing
  • Milestone 0.5 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

I'm flagging this as a duplicate of #134, even though that's mostly concerned with the text template syntax.

The thing here is I'm not sure how to implement elif/else. If anyone can come up with an patch that's not a total hack, I'd sure be willing to look into it.

Note: See TracTickets for help on using tickets.