![]() |
{vb:each} loop count...
Is there any way to find how many loops makes the vb:each in a template?
For example I want to do something like this HTML Code:
<vb:each from="arrayname" key="keyid" value="data"> |
I know this is the stupid way but it works :)
HTML Code:
<vb:if condition="$count = 0"></vb:if> If anyone knows other way (exept javascript) please tell me. |
Quote:
|
You could also use an array with numeric keys, if you can guarantee that the keys are continuous.
PHP Code:
|
It looks like a built in method will be added into a future vBulletin version....
Check this out and don't forget to VOTE http://tracker.vbulletin.com/browse/VBIV-10883 |
Vote added.
|
All times are GMT. The time now is 07:14 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|