Hi,

I'm asking myself if is it possible to know how many nodes a "[view:name of view]"-tag return.

It should be very useful to build conditional php statements.

Thanks,
Alessandro

Comments

mlsamuelson’s picture

Status: Active » Fixed

In Drupal 5 you can use [view:name of view=x] where x is the number of node results to display.

(BTW, in Drupal 6, you cannot control the number of nodes in the tag. Instead, you would set the number of results to show in the view's display.)

alex72rm’s picture

Status: Fixed » Active

No, I need to know in advance how many nodes are in the view, 'cause I must perform a particular action when nodes number is zero.

Anonymous’s picture

Why not put some code in the view on empty field ?

alex72rm’s picture

Uhm... it should be a good solution, but I don't know how to manage the related output.

Have you some more hint?

Thanks a lot,
Alessandro

Anonymous’s picture

Not really knowing what you need to do and also being no expert :)

insert view will display the view when it has content, or not

In views there is a field for empty text, which will take php, so if your view contains no results it displays the content of that field, so by putting your action in there you should achive what you want

pasqualle’s picture

Status: Active » Closed (won't fix)

closing all D5 issues

http://drupal.org/node/347819