I have a custom suggest link template for specific categories. All works well until I attach a file. After attaching the file the form refreshes to the original suggest link template.
How do I get it to refresh back to the template it was using?
Hm. I suppose there's not much practical value to being able to set a custom template for the redirect page, so that utility can be hijacked... open edit.php and change both instances of
if (!$template) $template = new template('redirect.tpl');
In this particular instance I call the custom suggest link from a custom display form so I don't require any conditions. I uploaded the custom file by ftp and to call it I simply have...
<a href="suggest.php?action=addlink&catid={CATID}&custom=yes&TID=suggestadvert">Submit New Advert </a>
The piece in red is the bit you add to the normal code (of course substituting suggestadvert for the name of your template.
Paul wrote: Hm. I suppose there's not much practical value to being able to set a custom template for the redirect page, so that utility can be hijacked... open edit.php and change both instances of
if (!$template) $template = new template('redirect.tpl');
to
$template = new template('redirect.tpl');
. This change will be applied to future versions.
Hi Paul - this doesn't seem to have been included in 3.3.4
Oh, I thought I'd said suggest.php. It was applied to suggest.php. I suppose custom 'edit' pages are a more useful possibility than changing the redirect page after edit too though so I'll apply it to edit.php now too.
Comments on Custom Suggest Link
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
I have a custom suggest link template for specific categories. All works well until I attach a file. After attaching the file the form refreshes to the original suggest link template.
How do I get it to refresh back to the template it was using?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Try hidden input fields in the form:
<input type="hidden" name="custom" value="yes">
<input type="hidden" name="TID" value="templatename">
Hopefully that works.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
Well, it worked to return to the correct form after attaching a file
BUT upon submitting, instead of moving on it returns to the form with {INCOMPLETE} at the top. It did submit the link to the category
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Hm. I suppose there's not much practical value to being able to set a custom template for the redirect page, so that utility can be hijacked... open edit.php and change both instances of
to . This change will be applied to future versions.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
In this particular instance I call the custom suggest link from a custom display form so I don't require any conditions. I uploaded the custom file by ftp and to call it I simply have...
<a href="suggest.php?action=addlink&catid={CATID}&custom=yes&TID=suggestadvert">Submit New Advert </a>
The piece in red is the bit you add to the normal code (of course substituting suggestadvert for the name of your template.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
Hm. I suppose there's not much practical value to being able to set a custom template for the redirect page, so that utility can be hijacked... open edit.php and change both instances of
to
. This change will be applied to future versions.
Hi Paul - this doesn't seem to have been included in 3.3.4
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Oh, I thought I'd said suggest.php. It was applied to suggest.php. I suppose custom 'edit' pages are a more useful possibility than changing the redirect page after edit too though so I'll apply it to edit.php now too.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
LOL! and I thought I was the only one with a bad memory <G>