Forums / Install & configuration / Wrong percentage in poll
Kristoffer Karlsson
Wednesday 30 May 2007 6:17:49 pm
The percentage calculation in my poll is wrong.
63 votes of 116 is 35%26 votes of 116 is 15%
Obviously that is not right...
I guess there must be something wrong in the following code. Am I right?
{let percentage = cond( $total_count|gt( 0 ), round( div( mul( $:item_count, 100 ), $total_count ) ), 0 ) tenth = cond( $total_count|gt( 0 ), round( div( mul( $:item_count, 10 ), $total_count ) ), 0 )}
_____________________________________ Blog: http://www.kristofferkarlsson.com Website: http://www.spelkanalen.com
Thursday 31 May 2007 12:31:33 am
I copied the template from http://svn.ez.no/svn/extensions/ezwebin/trunk/packages/ezwebin_extension/ezextension/ezwebin/design/ezwebin/templates/content/collectedinfo/poll.tpl
...but I still get the same result.
2 votes of 5 = 1%3 votes of 5 = 2 %
Strange...
Ideas?
Łukasz Serwatka
Thursday 31 May 2007 1:27:03 am
What happen when you clear the view cache? I did quick test and count works correct here.
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Thursday 31 May 2007 1:05:46 pm
Cleared cache
Still the same result...