I have a views profile which lists all the articles of a certain content type, in table view with fields giving some extra info.

Two questions:
How do I add a field on the left side which numbers these articles from 1 to ? (increasing as the list goes down)?
And/Or how to I place an item at the bottom of the screen listing the total number of items in that content type (and of a certain taxonomy)?

Many thanks for help in advance!

shane.

Comments

MidGe48’s picture

Use an ordered list view style

www.ZuNOB.com

shaneburger’s picture

Yes, but I lose the "tables" formatting which graphically works out nicer.
Tables also allows me to change the sorting method from one field to another.
I want to keep those "tables" capabilities, but just add a running number count down the left and a total count at the bottom.

MidGe48’s picture

You may have to custom theme your row.

At least you already have the functionality. After that, it is prettying things up.

www.ZuNOB.com

shaneburger’s picture

I've just tried some items from another thread, suggesting this will get me the total number of content nodes at the bottom...

<?php
$mytype = 'workshop_application'; // <<---------- set your content type here.
$count = db_result(db_query("SELECT COUNT(DISTINCT(n.nid)) FROM {node} n WHERE n.type='%s' AND n.status=1", $mytype));
echo "There are currently $count applications for review.";
?>

The post suggested putting this in the header or footer, using an "input filter field set" for PHP. However, I don't have the option for an input type of PHP for the header or footer... just Filtered or Full HTML.

vsr’s picture

IN D6 You have to enable PHP input format in your setting for the site. It was made separate In D6.

You will find it under Modules, Core Optional.

shaneburger’s picture

Now I feel like an idiot for not seeing that.
Thank you! That did the trick.

excaliburst’s picture

Hi,

I need to use the above PHP snippet, but I additionally need to filter for a CCK field 'klub' that needs to be of a certain value 'SMSK'.

How do I accomplish this in the above code?

Thanks a million

Morten E

WorldFallz’s picture

You may want to check out the http://drupal.org/project/views_calc and http://drupal.org/project/views_customfield modules.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz