[support] I Need List Position Integer for Class Names for Dynamically Generated List Items

Shai Gluskin shai at content2zero.com
Fri Feb 26 00:00:19 UTC 2010


Gang,

I'm overriding the function theme_item_list() and I want to output (in
addition to $classes) something like:

<li class="item 1">
<li class="item 2">

At first I thought that the lists I needed this for were going to be
generated by Views, which would have made this task a snap because Views
comes with views/theme/views-view-list.tpl.php which has row number
available as a variable.

But the content is being delivered by the Related content module (
http://drupal.org/project/relatedcontent) and doesn't make it's data
available to Views. Are all the list items for a particular parent available
as an object or an array and then a could do a "while" loop with
+1 increments after each loop. I'm just kind a stuck cause I thought I had
solved it by finding that Views template only to be disappointed. Note that
all of the items on the relevant lists are at the same top leve... no
annoying children :)

Thanks in advance for the help.

Shai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20100225/1bd724d8/attachment.html 


More information about the support mailing list