I need to display a friendly message if a repeat loop is empty. Example code:
<ul tal:repeat="data context/qr-list">
<li><a tal:attributes="href string:det-rec?id=${data/id}" tal:content="data/vaga">description</a></li>
</ul>
When the loop is empty, I will display a message: Sorry, no results.
You could use something like this:
Maybe you could use the length attribute of the repeat variable but I have never tested it with something like this. See Repeat variables on the Zope Page Templates Reference.