Share » Forums » Setup & design » External redirect to parent node

External redirect to parent node

External redirect to parent node

Thursday 16 March 2006 1:35:18 pm - 3 replies

Author Message

Betsy Gamrat

Friday 17 March 2006 6:26:30 am

You could use <b>/error/kernel/20.tpl</b> and then have javascript handle the redirect.

Basically, assume the parent is valid and strip off the last element of the current url (in location.href), then you can use location.href="new url" to handle the redirect.

(Starting point - code in <b>/error/kernel/20.tpl</b>)


{literal}
<script>alert(location.href);</script>
{/literal}

Marc Boon

Friday 17 March 2006 6:50:12 am

The error template would never be used, because there is no error.

I want the default (not overridden by my node templates) Folder view to do the redirect.
So I should probably have a override for the Folder class as the last line in my override.ini.append. But what do I specify there, that is the question.

I would rather not use javascript, but generate a HTTP 301 redirect to the parent node.
How to do that?

Matthew Carroll

Thursday 09 November 2006 8:52:53 pm

A little late to the party, but I was looking for something else and found this. On the off-chance this is still useful Marc, the way to do this would be to use the RedirectOperators extension:

http://ez.no/community/contribs/template_plugins/redirect_operators

I do this kind of redirect to a child node, but the principle is the same - see this thread:

http://ez.no/community/forum/setup_design/auto_redirect_to_a_sub_item

Matthew

http://carroll.org.uk

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu