This project is read-only.

Redirection from a Page Content Item

Topics: Writing modules, Writing themes
Jun 21, 2011 at 1:55 AM

I need auto redirection from a specific page.

Say, I could create a new text filed for a Page Context with a value of a redirect URL and then somewhere in the code could use it.

The problem is that I don't understand how to use this value.

Could anybody just hint me what should I do (some separate module or filed)

How to intercept the request and get the data. 

I found this controller  Orchard.Core.Routable.Controllers.ItemController as I understand this is indeed the place where I can put the redirection but how?

I really need it because some pages must exist in the sitemap structure but do not contain any content.

Jun 21, 2011 at 3:41 AM

You wouldn't do that from the controller but rather you should build a part (not a field) and handle this from the driver for that part.

Jun 21, 2011 at 11:03 AM
Oh yes forgot about the Parts you are right. Thank you for the hint.