is there an easy way to get a record count of total number of items or iterations returned by a dtml-in tag? I want to say if more than 26 records are returned then don't do this. i.e. <dtml-in firetruck> <dtml-if recordcount > 26> do this <dtml-else> do this </dtml-if> </dtml-in> thanks for your time josh on
is there an easy way to get a record count of total number of items or iterations returned by a dtml-in tag?
<dtml-var sequence-length> --jfarr
great, thanks a lot! I think that this page should be updated with this info: http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.7.2.html unless I am wrong. josh on
josh on wrote:
great, thanks a lot!
I think that this page should be updated with this info:
http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.7.2.html
unless I am wrong.
It should. However, because the method used to generate the "old" guides is not the method that will be used to generate the new guides. The new guides, which will be cvs backed and much more amenable to community update, will be coming along: please see the "documentation chat", http://www.zope.org/Documentation/Chats/doc_chat for more information. ethan mindlace fremen Zopatista Community Liason
Hi, I am trying to only perform a task if there are less than a certain amount of records returned by a query. Jonothan gave me the variable name for the record count:
is there an easy way to get a record count of total number of items or iterations returned by a dtml-in tag?
<dtml-var sequence-length> --jfarr
But I am struggling to put that into an if statement: <dtml-in linescontributed> line:<dtml-var content><br> <dtml-var sequence-length><br> <dtml-if "sequence-length == 10"> WHOOP WHOOP </dtml-if> </dtml-in> There are ten lines returned by this query but zope sees the line: <dtml-if "sequence-length == 10"> and thinks I am trying to say sequence minus length, rather than refer to the dtml var sequence-length Could anyone help me ut with this? josh on On another smaller note how do I write a greater than sign in this context?
<dtml-in linescontributed> line:<dtml-var content><br> <dtml-var sequence-length><br> <dtml-if "sequence-length == 10"> WHOOP WHOOP </dtml-if> </dtml-in>
There are ten lines returned by this query but zope sees the line:
<dtml-if "sequence-length == 10">
and thinks I am trying to say sequence minus length, rather than refer to the dtml var sequence-length
<dtml-if "_['sequence-length'] == 10"> But maybe is better to use: <dtml-if "_.len(linescontributed)==10"> <dtml-in...> ... ... </dtml-if> This must be faster, I suppose... PM
participants (4)
-
ethan mindlace fremen -
Jonothan Farr -
josh on -
Marcel Preda