stevengiraldo Posted March 27, 2015 Share Posted March 27, 2015 Hello, Is there any function like Tools:Redirect() but I can redirect to a friendly url?, Or I could build the function from others? Thanks. Link to comment Share on other sites More sharing options...
PascalVG Posted March 29, 2015 Share Posted March 29, 2015 Maybe small javascript? echo '<script type="text/javascript">window.location = "http://www.yoururl.com/"</script>'; My 2 cents, pascal Link to comment Share on other sites More sharing options...
stevengiraldo Posted March 30, 2015 Author Share Posted March 30, 2015 Maybe small javascript? echo '<script type="text/javascript"> window.location = "http://www.yoururl.com/" </script>'; My 2 cents, pascal Thanks Pascal, in fact, I'm doing it that way right now, but it's slow since the url comes from the server. Link to comment Share on other sites More sharing options...
PascalVG Posted March 30, 2015 Share Posted March 30, 2015 Don't you know the URL before page construction time yet? If you do, you could assign it to a smarty var (i.e. in the controller) before you give it to the tpl file. Or does it depend on choices on the client side or so? Please elaborate a little how the process works, pascal Link to comment Share on other sites More sharing options...
stevengiraldo Posted March 30, 2015 Author Share Posted March 30, 2015 (edited) Don't you know the URL before page construction time yet? If you do, you could assign it to a smarty var (i.e. in the controller) before you give it to the tpl file. Or does it depend on choices on the client side or so? Please elaborate a little how the process works, pascal It´s right. I don´t know the URL, because first it's necesary a selection by user in a select. User select a option and I send a request ajax, then, my module builds a url friendly and response request ajax. by last, I'm using location.href Thanks. Edited March 30, 2015 by stevengiraldo (see edit history) 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