I have a content type in which there is an entity reference. All content of it is set to unpublished by default and upon creation a rule is run to assign an organic group based on the selected reference.

Now, upon publication of the content I want to have an incremental number assigned to a node based on the entity reference it contains. For example:

Node1 ref:abc c:1
Node2 ref:def c:1
Node3 ref:abc c:2
Node4 ref:abc c:3
Node5 ref:def c:2

How can I achieve this?

  • Check [this post] (stackoverflow.com/questions/12763223/…) for info about Revisioning module's added hooks for when a node gets published, revised or reverted. – longboardnode Nov 1 '15 at 1:35
  • 1
    I ended up using something similar to the code snippet here drupal.org/node/2058739 as an action rule. – Jed_BH Dec 5 '15 at 10:44
  • Glad you found a solution. I'd recommend answering your own question with your code snippet included (as opposed to a link) for others, this will also close the question. If my first comment was helpful feel free to +1 :) – longboardnode Dec 8 '15 at 2:56
  • Suggestion: transform your comment in a real answer (include that link, and also a copy of the relevant part of it) ... – Pierre.Vriens Dec 10 '15 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.