Forum Discussion
VikasB
8 years agoBoss
BowBharath I think in rare cases answer count may cross this limit. So you can use it
<#assign string = "Best Answer" /> <#assign bestAnswersCount = count /> <#if bestAnswersCount > 1> <#assign string = "Best Answers" /> <#elseif bestAnswersCount > 999 /> <#assign bestAnswersCount = "1k" /> <#elseif bestAnswersCount > 1999 /> <#assign bestAnswersCount = "2k" /> <#elseif bestAnswersCount > 2999 /> <#assign bestAnswersCount = "3k" /> <#else> <#assign bestAnswersCount = "3k+" /> </#if> <li class="item">${bestAnswersCount} ${string}</li>
LMK If you think it can cross it. If yes, I'll try to find you a better solution.
BowBharath
8 years agoAce
How about while loop ?
Any reference or basic coding help me do it more efficient ?