page redirect after login
Permalink 2 users found helpful
Hi there!
Does anyone have a good suggestion on howto redirect a user when they login on a page using the login block? There will be several different login blocks on different pages and each one needs to redirect to a specific page.
Best regards
Henrik
Does anyone have a good suggestion on howto redirect a user when they login on a page using the login block? There will be several different login blocks on different pages and each one needs to redirect to a specific page.
Best regards
Henrik
doesn't it allow you to specify the path to the page?
I can specify a page path within the dashboard->user section yes, but this I believe will redirect all login situations to the same page path. What I'm looking for is individual redirections on the different login pages. e.g. I have 4 language sections and there is a login page within each language. The login must redirect to a page within it's own language section.
Hi,
In the view.php of login block, find the hidden field named rcID and replace the value="<?php echo $c->getCollectionID(); ?>" to value="cID of the page to which you want to redirect". Thats it you are done.
For instance if you want to redirect to a page which has cID = 107, then
replace the below code
with
So for adding multiple login blocks, create a page selector field on form_setup_html.php, store the value in database and in view.php use the below given code
Hope you understand
In the view.php of login block, find the hidden field named rcID and replace the value="<?php echo $c->getCollectionID(); ?>" to value="cID of the page to which you want to redirect". Thats it you are done.
For instance if you want to redirect to a page which has cID = 107, then
replace the below code
<input type="hidden" name="rcID" id="rcID" value="<?php echo $c->getCollectionID(); ?>" />
with
<input type="hidden" name="rcID" id="rcID" value="107" />
So for adding multiple login blocks, create a page selector field on form_setup_html.php, store the value in database and in view.php use the below given code
<input type="hidden" name="rcID" id="rcID" value="$cID" />
Hope you understand
Hey.
Yes that was also what i finally figured out:-)Then by clicking 'return to same page' i get the redirection of my choise:-) That's perfect.
Thanks for helping!
Yes that was also what i finally figured out:-)Then by clicking 'return to same page' i get the redirection of my choise:-) That's perfect.
Thanks for helping!
can you mark it as answer? so that it may help others in future.
Yes, consider it done;-)
Hi.
I think the login block has been updated sice this response:
The line of code you mention is no longer there, instead there is:
I tried to change it to:
But obviously this did not work :)
Any insight?
I think the login block has been updated sice this response:
The line of code you mention is no longer there, instead there is:
<?php if($returnToSamePage ){ echo $form->hidden('rcID',$c->getCollectionID()); } ?>
I tried to change it to:
<?php if($returnToSamePage ){ echo $form->hidden('rcID','76'); } ?>
But obviously this did not work :)
Any insight?
You cannot do specific location without paying for it.......
yes you can...
in view.php do this:
and then it works
in view.php do this:
<input type="hidden" name="rcID" id="rcID" value="your value" /> <?php #if($returnToSamePage ){ # echo $form->hidden('rcID',$c->getCollectionID()); #} ?>
and then it works
did you figure this out?
Hi dere. Could you explain how to do this in more detail:
"create a page selector field on form_setup_html.php, store the value in database and in view.php"
1. how do I create a page selector field?
2. how do I store the value in the database and in view.php?
"create a page selector field on form_setup_html.php, store the value in database and in view.php"
1. how do I create a page selector field?
2. how do I store the value in the database and in view.php?