Hello!

I'm trying to set the defaul value of a select box based on a
parameter, I'm trying something like

{% for item in items_list %}
<option value="{{item.id}}" label="{{item.name}}"
            {% ifequal item.id session.id %}
                      selected
            {% endifequal %}
       >{{item.name}}</option>
 {% endfor %}   

But it complains about non existent item.id. As far as I can see in
the for documentation there is no way to get the actual value of the
object, isn't it? In that case how could we do that sort of things?

Is there any way to set a temporary value on a template? Perhaps that
would solve the problem...

Best regards,

--
Antoni Aloy López
Binissalem - Mallorca
Soci de Bulma

Reply via email to