How to redirect in Gk Contact

Responsive, suitable for any type of business, built for any needs elegant one-page Joomla template.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Dec 19, 2016 8:35 am
Reply with quote
Report this post
Hello,

I am trying to redirect after success post in Gk Contact, with the code bellow but it keeps me going back to the home page of my site instead of URL in the code... Could you please help me and tell me how to redirect ?
Thank you in advance.
Code: Select all
               // sending and redirecting
               $send = $mailer->Send();
               //
               if ( $send !== true ) {
                  $app->redirect($post['return'], JText::_('PLG_GKCONTACT_MESSAGE_SENT_ERROR') . $send->__toString(), "error");
               } else {
                   $app->redirect($post['http://mysite/mylanding']);
               }
            } else {
               $app->redirect($post['return'], JText::_('PLG_GKCONTACT_MESSAGE_EMPTY_ERROR'), "error");
            }
         } else {
             $app->redirect($post['return'], JText::_('PLG_GKCONTACT_NO_RECIPENT_INFO'), "error");
         }
      }
   }
User avatar
Senior Boarder

teitbite
Tue Dec 27, 2016 11:31 am
Reply with quote
Report this post
Hi

Code: Select all
$app->redirect($post['http://mysite/mylanding']


is not correct. Please leave it as:

Code: Select all
$app->redirect($post['redirect']


and somewhere above those lines use:

Code: Select all
$post['redirect'] = http://mysite/mylanding;
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.