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

 
Mnkras replied on at Permalink Reply
Mnkras
doesn't it allow you to specify the path to the page?
Hkofoed replied on at Permalink Reply
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.
SVijay replied on at Permalink Best Answer Reply
SVijay
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
<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
Hkofoed replied on at Permalink Reply
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!
SVijay replied on at Permalink Reply
SVijay
can you mark it as answer? so that it may help others in future.
Hkofoed replied on at Permalink Reply
Yes, consider it done;-)
dancer replied on at Permalink Reply
dancer
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:

<?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?
Steevb replied on at Permalink Reply
Steevb
You cannot do specific location without paying for it.......
gailsedotes replied on at Permalink Reply
yes you can...
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
zoinks replied on at Permalink Reply
did you figure this out?
zoinks replied on at Permalink Reply
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?