Hi all,

I have a quick suggestion to improve the Loop component:

We should be able to specify a block to display if the loop source is empty (size = 0)

<div t:type="loop" source="emptyList">
<t:parameter name="empty">There is no item matching your request</ t:parameter>
</div>

I know we can do this :
<t:if test="emptyList">
        <div t:type="loop" source="emptyList">
<t:parameter name="empty">There is no item matching your request</ t:parameter>
        </div>
</t:if>

BUT this will have the result of calling the "getEmptyList()" getter in the component code twice. If you access the database in the getter (as the docs suggest quite a few times), this will call the database twice for nothing.

What do you guys think ?

--
David

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to