Webmastersite.net
Register Log In

custom table search redirect

Comments on custom table search redirect

david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Oct 09, 2008 - 9:43 AM:

Hi Paul,

I added this to my customtable_search.tpl:

<input type="hidden" name="redirectto" value="{CURRENTURL}" />


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
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Oct 12, 2008 - 9:07 AM:

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.
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Oct 12, 2008 - 9:36 AM:

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:

<form action="generics.php?filled=1&action=edit&classname=customtablename&id={CUSTOMTABLENAMEID}" method="post">


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).
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Oct 12, 2008 - 10:44 PM:

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?
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Oct 13, 2008 - 1:40 AM:

Because it is easier to edit a custom link this way. smiling face

Doesn't matter. I could put the edits onto a totally separate custom template, the redirection never works, when entered manually into a form.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Oct 13, 2008 - 10:39 PM:

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.
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Oct 14, 2008 - 2:19 AM:

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)
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Oct 14, 2008 - 8:25 AM:

<input type="hidden" value="{CURRENTURL}" name="destination" />
solved it. smiling face
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.