enable the use string: ${foo | nothing} to avoid a KeyError
Bug #394011 reported by
Edwin Grubbs
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
z3c.pt |
Triaged
|
Undecided
|
Unassigned |
Bug Description
Currently, the following tal with raise a KeyError if $foo is undefined.
<span tal:content=
I would like to be able to indicate that I just want an empty string if the variable is undefined. The most consistent syntax would be:
<span tal:content=
This would be a lot less redundant than what I have to do now:
<span tal:define="foo foo | nothing" tal:content=
Changed in z3c.pt: | |
status: | New → Triaged |
To post a comment you must log in.
2009/6/30 Edwin Grubbs <email address hidden>: "string: Hello, ${foo}" /> "string: Hello, ${foo | nothing}">
> Public bug reported:
>
> Currently, the following tal with raise a KeyError if $foo is undefined.
> <span tal:content=
>
> I would like to be able to indicate that I just want an empty string if the variable is undefined. The most consistent syntax would be:
> <span tal:content=
This would yield:
<span>Hello, </span>
Can't you do:
<span tal:content= "string: Hello, ${foo} | string:">
\malthe