Twig Playground

Hi Joe, I have been playing in the playground and having fun, but seem to have run into a problem. This code behaves as expected:

{% set stamps = cms.objects("Admiral") | krsort %} // objects are sorted in reverse ID order

{# {% set c = count(stamps) %} #}

{% for stamp in stamps %}

{{stamp.denom}}~~{{stamp.cpv_type}} Zone {{stamp.cpv_zone}} ~ Plate {{stamp.plate}} ~~{{stamp.title}}

{% for t in stamp.tags %}

{{t}}

{% endfor %}

<br>

{% endfor %}

However, if I remove the remarking around the 2nd line, "count" is not recognized: {"error":{"message":"500 Internal Server Error - Unknown \"count\" function in \"__string_template__b599c1577f4a3df1cd1630a94f8e5c4f\" at line 2."}}

( I seem to have the same issues with your similar functions as well...hence the "| krsort".

If I am missing something easy to correct - great; if it is 'complicated' it can wait until Friday.

Thanks.

1 reply