Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.1
Component:
feed displays
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Jan 2009 at 03:59 UTC
Updated:
31 Aug 2010 at 05:15 UTC
How can I display a number count in views, for example if I am listing all the members of the site in list view how would I display a 1 next to the first name a 2 next to the second and etc. Is there an option for this? Thanks.
Comments
Comment #1
merlinofchaos commentedUse the HTML List style and set the type to Ordered.
Comment #2
clarkwolfe commentedI'm sorry, I did not mean list view, I should of said table view. It's very convenient for members to be able to see a table view of other members and their contact information and I love how Views makes this work. Is there a way to number a view with the Style: Table. I don't believe there is, but was wondering if anyone had a workaround? Thanks!
Comment #3
merlinofchaos commentedYou'll have to theme the view and add the numbering yourself. This is doable fairly readily with the table template.
Comment #4
clarkwolfe commentedThanks for the help. Would this template be the "views-view-table.tpl.php" file located under the theme folder of the views module? If so the php code is very short, with the variable I want displayed named "$count" I believe. Would anyone know how to actually display that count on the table much like in the list view when you select ordered list. Thanks!
Comment #5
clarkwolfe commentedI figured it out, with a little PHP help from some friends. Thanks for your help. Now I can number all of my tables no matter how they are sorted.
Comment #6
clarkwolfe commentedI figured it out, with a little PHP help from some friends. Thanks for your help. Now I can number all of my tables no matter how they are sorted.
Comment #8
tommytom commentedCould you share your PHP code ?
Comment #9
calefilm commentedWhat's the point of asking us a question and then saying "I figured it out!" but not adding the solution