I am creating a page redirect rule that is triggered when someone adds a comment to a page.
What I want is a popup window to appear with the contents of the page the user is being redirected to after they add a comment. I need to use rules because the page the user is directed to is different for each instance.
I created the following:
Event: After saving a new comment
Condition: Node is of content type: basic
Action: Execute custom php code
$node_id = "69";
header( "Location: /node/$node_id/lightbox2");
exit;
When I run this code I get redirected to the following page.
http://www.mysite.com/node/69/lightbox2
However, lightbox2 does not engage. I thought I would need to add a javascript trigger or something to the code to make it work. However, I cannot find any code to do this.
Does anyone know what I am missing to make this work?
Comments
Comment #1
jcsnyder commented+1
Comment #2
yukare commentedI just do not understand what you want.
The user coments on a node, say node/1, then it is redirected to where? Like, show a preview in the current page after the coment is submited of the new page where the user is being redirected?
Comment #2.0
yukare commentedcode error