0

I'm struggling to get a Rules Link set in a Custom Content Pane to trigger a Rules Link and work. I've done many tests and using the URL path provided by the Rules Link Edit page, (ie domain/content/post-new-content) all I get is a 404 despite my many trials and viewing/reading of info docs online.

Put simply, I want a link set on a Custom Content Pane to show a link which the user clicks, this will then trigger a Rules set to check: a) the user has valid auth/role; B) and then redirect to a Post page; if not authorised then redirect to a 'Subscription' page. Through my testing, a 'standard' link to an Add Content page works fine, so I presume it is something within the Rules/Rules Link framework I working within the D7.2x

Can someone please provide some generalism how this (assumed simple flow) should work. HELP!

  • Whilst the Rules Documentation says you can only add a Rules Link via a View, my above question ponders the whether a link URL can be triggered as a simple link ie "post-new-content" in a Custom Content pane. Todate I cannot get the trigger to work as it results in only a 404-error yet if I create the same in a View, it works, at least to the re-directed page I require; next I require the Rule to first check that the user has a 'Paid' role in order to have the set permission to post. Has anyone successfully managed to post A Rules Link in a Custom Content pane and what did you do exactly?? – Paul B Sep 19 '13 at 15:25
0

To render a Rules link programmatically use the following:

<?php
    print render(rules_link_render('RULES_LINK_NAME', $node->nid));
?>
  • Thank you very much @TheMGamer. Just the answer a learning novice need today (-: This answer now give me so many more options with Rules Link as a PHP embed. – Paul B May 20 '14 at 10:40
  • @PaulB up vote my answer and accept my answer as the best if it is easy for you! Thank you – TheMGamer Jun 24 '14 at 1:04

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.