Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Is it possible to redirect away from the current page upon registration?
I've tried using rules + the login destination module, but to no avail - I can't seem to redirect, when the modal form closes the user is always back to the page that they came from.
Comments
Comment #1
michaelj CreditAttribution: michaelj commented+
Comment #2
ckngUnable to get the redirection to work, am using total control dashboard with redirection option after login.
The redirected page is loaded in an alert box.
Comment #3
jaykainthola CreditAttribution: jaykainthola commentedYou can use ctools_ajax_command_redirect() to redirect to other page.
Comment #4
areynolds CreditAttribution: areynolds commentedThanks for the hint @jaykainthola, for fellow gumshoes, my path to greatness was as follows:
Comment #5
jaykainthola CreditAttribution: jaykainthola commented@areynolds Kindly check below code. I have used ajax_register module in one of my project. This is the code from that module on user register submit function.
$redirect_url ="";
ctools_include('ajax');
$commands = array();
$commands[] = ctools_ajax_command_redirect($redirect_url);
return array('#type' => 'ajax', '#commands' => $commands);
Thanks,
Comment #6
frjo CreditAttribution: frjo commentedComment #8
areikiera CreditAttribution: areikiera commentedThis can also be accomplished with Rules: also see: https://drupal.org/node/1873360
Comment #9
rajesh.vishwakarma CreditAttribution: rajesh.vishwakarma commenteduse destination for registration/login link on tpl file. For registration use:
Comment #10
gjpino83 CreditAttribution: gjpino83 commentedHello guys,
Could someone please help me to know where to add the code from #4? this one:
Should I added to my template or create a custom module?
Thanks!