Display the $count in teaser views in Views 1

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by bflora on February 4, 2009 at 5:21am

I've been working with views 1 for a few months and I've found something I don't know how to do.

When theming a "list" style view, I'm able to add the variable $count to the view's theme file to number the nodes in the view. 1, 2, 3, 4, etc.

How can I number the nodes in a "teaser" style view? 1,2,3,4 like that?

Is there something other than $count that I can use to do that?

Comments

Try $id

Posted by merlinofchaos on February 4, 2009 at 5:48am

Hi Merlin. I've added that

Posted by bflora on February 4, 2009 at 6:01am

Hi Merlin.

I've added that into my view, which lists the most popular nodes of a certain type in reverse order of node radioactivity, a la reddit.

print $id is generating some text, however I don't understand what I'm seeing.

It creates a "1" for the first node, but then a "10" for the second node, followed by 11, 12, 13 and on.

Any thoughts on what the problem could be? Thanks.

Anyone know what could be

Posted by bflora on February 7, 2009 at 3:07am

Anyone know what could be causing this weirdness with the numbering? Thanks.

Views Developers

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /