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

Michel Morelli michel at ziobuddalabs.it
Wed Mar 3 12:58:44 UTC 2010


Shai Gluskin ha scritto:
> 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
Hi, install and enable Devel and sub-modules "Themer info".
Go in the page where you need to change the content, check "Themer info" 
checkbox (you will see this checkbox in the left bottom corner of every 
page while the "Themer Info" module is active), now click (left button 
mouse) on the content that you need to change and see what "Themer info" 
say to you (functions name, template files, other).

Hope that this help you.

M.

-- 
Michel 'ZioBudda' Morelli                       michel at ziobuddalabs.it
Sviluppo applicazioni CMS DRUPAL e web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 --  Fax: +39-0291390660

http://www.ziobudda.net                         ICQ: 58351764  
http://www.ziobuddalabs.it                      Skype: zio_budda
http://www.ziodrupal.net       			MSN: michel at ziobuddalabs.it                   
						JABBER: michel at ziobuddalabs.it



More information about the support mailing list