ROLAND_JUNO Posted August 23, 2017 Share Posted August 23, 2017 Hi, I am trying to figure out how to create a redirect link with Process Wire, it's so easy to do with Word Press but not sure how to go about it with Process Wire. Can anyone kind of guide me through the steps on how to do this or is there a easy Module that will do this? Thanks Cam Link to comment Share on other sites More sharing options...
abdus Posted August 23, 2017 Share Posted August 23, 2017 There's $session->redirect($url) https://processwire.com/api/ref/session/redirect/ You can use it in conjuction with $page->url($params) to generate any type of page url for redirection https://processwire.com/api/ref/page/url/ Link to comment Share on other sites More sharing options...
ROLAND_JUNO Posted August 23, 2017 Author Share Posted August 23, 2017 Thanks abdus where do I put this code? Link to comment Share on other sites More sharing options...
abdus Posted August 23, 2017 Share Posted August 23, 2017 At the top of your template files, inside a <?php ?> tag, preferably before outputting anything. You can't send a new header after you've already sent them (i.e. output any data) For example: (in your home.php) <?php namespace ProcessWire; $session->redirect("/about/"); 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now