0

I have multiple OG groups where a person posts within the group and the group is private. I need to DISPLAY a field on each node that shows the serial/count/id of that node within its group.

Example:

Group A:

nid=1 & post_id=1

nid=2 & post_id=2

nid=4 & post_id=3 --node 3 was created in group B, but post_id is only for group A.

Group B:

nid=3 & post_id=1 -- This is the 3rd node created on the site but the first in group B.

How do I display/create a value like post_id in a node template file? Can this be done through Rules when creating a node, or calculated on the fly within the template file?

Gibbet
  • 143
  • 9
  • in template file use : echo '
    ', print_r($node,true) , '
    '; exit; It will display node content , maybe you'll find what exactly your're searching
    – Fky Sep 21 '15 at 12:11
  • I am aware of the contents of $node. I think I need some sort of query that finds the count of the post based on the OG group the node is part of. – Gibbet Sep 22 '15 at 03:12

0 Answers0