Hi I whant too create 2 code field
one that show how many time the node have bean viewd
and one that show how many comments there is in the node.
but I can't find any were how to do this hope someone know's how to do this.
Hi I whant too create 2 code field
one that show how many time the node have bean viewd
and one that show how many comments there is in the node.
but I can't find any were how to do this hope someone know's how to do this.
Comments
Comment #1
swentel commentedWell if you go to admin/ds/nd/fields, you can create a new field via the interface. Following code will output the number of comments:
You can also create your own module and implement hook_ds_fields - Take a look in nd.module how we created the read_more button and replace the code from that with the PHP code above.
The code for statistics should look a bit like this:
I'm changing the title a bit, because we're going to add those two fields as default in the node displays module this weekend too.
Comment #2
swentel commentedActually, I've added these snippets on a separate page on the documentation pages, http://drupal.org/node/700056
For now, we aren't going to add these fields by default.
Comment #3
wibbla commentedThanks for the help m8.