[prev in list] [next in list] [prev in thread] [next in thread] 

List:       drupal-support
Subject:    [support] I Need List Position Integer for Class Names for
From:       Shai Gluskin <shai () content2zero ! com>
Date:       2010-02-26 0:00:19
Message-ID: 9f68efb71002251600x5f83d206h64224ef583bf7a1f () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

Gang,<div><br></div><div>I&#39;m overriding the function theme_item_list() and I want \
to output (in addition to $classes) something like:<div><br></div><div>&lt;li \
class=&quot;item 1&quot;&gt;</div><div>&lt;li class=&quot;item 2&quot;&gt;</div> \
<div><br></div><div>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.</div> <div><br></div><div>But the content is being delivered by the Related \
content module (<a href="http://drupal.org/project/relatedcontent">http://drupal.org/project/relatedcontent</a>) \
and doesn&#39;t make it&#39;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 \
&quot;while&quot; loop with +1 increments after each loop. I&#39;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 :)</div> <div><br></div><div>Thanks in advance for the \
help.</div><div><br></div><div>Shai</div></div>



-- 
[ Drupal support list | http://lists.drupal.org/ ]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic