如何檢索數組元素的值(字符串)並檢索實體的屬性值?我嘗試這樣做:如何檢索數組元素的值(字符串)並使用它來檢索實體的屬性值?
{% for item in items %} //item is an entity
{% for column in columns %} //column is just an array with name of columns
{% set columna = column.value %}
{{ item.columna }}
{% endfor %}
{% endfor %}
而究竟是什麼不起作用?你看到一些錯誤嗎? – 2014-09-23 11:48:34