So basically I have a form, and I pull up the search results in order to edit one of them. Whenever I edit one, I want the next page to show up to be the same page as the search results page.
"I believe redirectto would only be used if you didn't fill in the spot on the redirects page. " Precisely. That's my point. I thought that the 'redirectto' field in a form does redirect you to the specified page after a form submission, REGARDLESS of what is in the admin panel redirects (if anything at all).
So what's the documentation you're looking at, anyhow? I don't recall a redirectto hidden input option and I can't find one in the knowledge base. And looking at the code tells me there certainly isn't any such feature (there is a redirectto parameter used on several pages, but only for those pages). The only related article is scripts.webmastersite.net/w...ogic_to_redirects-445.html which gives a very different method.
no documentation. I assumed that redirectto is simply a variable that is passed to a form, and it redirects there no matter what. Ok, so no worries, I'll figure something out. (if I can pass a variable that I can show on the redirect.tpl, then I can redirect to where I want I guess)
Comments on custom table search redirect
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Hi Paul,
I added this to my customtable_search.tpl:
It doesn't redirect back to the current url. I don't get any errors anything. Search is working fine.
Am I missing something?
Thanks
David
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
You mean when there's no match? I believe redirectto would only be used if you didn't fill in the spot on the redirects page.
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
No, when there is a match. I do a search in the custom table, then on the results page, I have this in the template:
So basically I have a form, and I pull up the search results in order to edit one of them. Whenever I edit one, I want the next page to show up to be the same page as the search results page.
"I believe redirectto would only be used if you didn't fill in the spot on the redirects page. "
Precisely. That's my point. I thought that the 'redirectto' field in a form does redirect you to the specified page after a form submission, REGARDLESS of what is in the admin panel redirects (if anything at all).
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
If you're looking to redirect after editing, you of course have to have your redirect on the edit page. So why are you editing customtable_search.tpl?
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Because it is easier to edit a custom link this way.
Doesn't matter. I could put the edits onto a totally separate custom template, the redirection never works, when entered manually into a form.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
So what's the documentation you're looking at, anyhow? I don't recall a redirectto hidden input option and I can't find one in the knowledge base. And looking at the code tells me there certainly isn't any such feature (there is a redirectto parameter used on several pages, but only for those pages). The only related article is scripts.webmastersite.net/w...ogic_to_redirects-445.html which gives a very different method.
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
no documentation. I assumed that redirectto is simply a variable that is passed to a form, and it redirects there no matter what. Ok, so no worries, I'll figure something out. (if I can pass a variable that I can show on the redirect.tpl, then I can redirect to where I want I guess)
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
<input type="hidden" value="{CURRENTURL}" name="destination" />
solved it.