Have anybody tried this?

Currently I am using Publish Content Module to Un/Publish contents, but the module doesn't support Confirmation action, if somebody hits Publish/Unpublish it just does the action straight away without asking confirmation.

I have been looking for the solution and Rules Link modules advertises it as its promo feature. Being a newbie I am not much aware of Rules power, so, any hint how could I Publish/Unpublish content with this would be very helpful.

So, far I tried by creating new Link which displays in my content type, When I click the link it asks for confirmation, but I couldn't figure out how to exactly Publish/Unpublish the content after that.

1 Answer 1


I solved a similar problem with the Flag and Rules modules. I created a flag called 'Published' for nodes and two rules that are activated when content is flagged/unflagged with this flag. These are my settings:

'Published' flag

  • Bundles: Article
  • Display in entity links: Display link as field
  • Link type: JavaScript toggle

If you need the flag for (an)other content type(s) too, you simply have to check the box in the flag settings.

'Published node' rule

  • Event: A node has been flagged, under 'Published'

  • Action: Publish content: Parameter: Content: [flagged-node]

'Unpublished node' rule

  • Event: A node has been unflagged, under 'Published'

  • Action: Unpublish content: Parameter: Content: [flagged-node]

If you want to, you can add some extra actions to the rule (e.g. display a message).

  • actually this sounds a good solution too, to trigger action/rules when a content is flagged with certain flag.
    – user12947
    Commented Oct 29, 2013 at 18:11
  • Hi, I have been trying this, but when I get to select action, I cannot select anything, it says invalid node and I cannot create any action. Can you guide me, how you did?
    – user12947
    Commented Oct 29, 2013 at 18:33
  • I also tried with flag action, but it supports just one condition, I can unpublish the content but cannot publish back with same action, it creates loop
    – user12947
    Commented Oct 29, 2013 at 18:46
  • I've updated my answer. I hope you can solve your problems now.
    – Jeroen
    Commented Oct 29, 2013 at 19:59
  • thanks... somehow I didn't get that Rules Dropdown selector of fields and then I manually typed node in action, it was showing the error. Now, I manually typed flagged-node as you said, it works.
    – user12947
    Commented Oct 29, 2013 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.