Recently I experienced an unexpected result while trying to render a tuple of two items in a diml-method.
I brought the code down to its essence.
In a dtml method I have the following code:
<dtml-var "tupleTest()"> <dtml-in "tupleTest()" prefix="v"> <p><dtml-var "v_item"> </p> </dtml-in>
The sequence of tuples is prepared in a function:
"test with a list of tuples"
The result when viewing the diml method looks like:
[('a', 1), ('a', 2), ('b', 1), ('b', 2)]
The call to <dtml-var "tupleTest()"> correctly displays the list of tuples, but the dtml-in sequence only displays the second item of each tuple.
This happens only when the tuple consists of 2 items. When the number of items is higher, the tuples are correctly displayed, also in the dtml-in sequence.