Browse files

add {count} to EE1

  • Loading branch information...
1 parent a637bed commit ff9a5bba2ce225c51adb6b65752690dbf4a3ee34 @brandonkelly brandonkelly committed Feb 24, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 ee1/fieldtypes/pt_list/ft.pt_list.php
View
7 ee1/fieldtypes/pt_list/ft.pt_list.php
@@ -166,11 +166,14 @@ function display_tag($params, $tagdata, $data, $settings)
$data = explode("\n", $data);
- foreach ($data as $item)
+ foreach ($data as $index => $item)
{
$item_tagdata = $tagdata;
- $vars = array('item' => $item);
+ $vars = array(
+ 'count' => ($index+1),
+ 'item' => $item
+ );
$item_tagdata = $FNS->prep_conditionals($item_tagdata, $vars);
$item_tagdata = $FNS->var_swap($item_tagdata, $vars);

0 comments on commit ff9a5bb

Please sign in to comment.