V
V
Vasily Bratushka2014-05-06 14:10:27
Drupal
Vasily Bratushka, 2014-05-06 14:10:27

How to create a block in Drupal 7 counting certain types of content types?

This question was asked here: www.drupal.ru/node/109873.
You need to make a table like this:

---------------------------------------------------------
| Тип материала | Количество нод | Ссылка на добавление |
---------------------------------------------------------
|    Артикул    |        8       |       Добавить       |
---------------------------------------------------------
|    Статья     |        5       |       Добавить       |
---------------------------------------------------------

1) Material types are set rigidly (for example: Article, Article)
2) Number of nodes - those nodes that this particular user created
3) If he did not create a node of this type - The number of nodes is displayed equal to zero
4) Add - a link to the creation of this material
Tried through the Views module. Using aggregation, I managed to count the number of my nodes (for a registered user), but only those types of material are shown, the number of which is > 0.
There are rumors that you can still do it through CCK, but I haven’t figured it out yet.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bratushka, 2014-05-07
@emigrant90

I decided it myself (with a terrible sheep code in the template, I parsed the table for the necessary values). The solution is here www.drupal.ru/node/109873.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question