Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions /

Conditional redirect page for seasons


Reply


2 Posts   1558 Views

Avatar
NickJacobs

Community Member, 144 Posts

28 January 2010 at 11:13am

In a site under development I have a series of pages which show seasonal highlights, ie:

+ Seasonal-highlights
-Spring
-Summer
-Autumn
-Winter

Seasonal-highlights is a redirector page type, and I want it to redirect to one of the children based on a month value

ie:
if month=12,1,2 -> summer
if month=3,4,5 -> autumn
if month=6,7,8 -> winter
if month=9,10,11 -> spring

Is it possible to alter/override the redirector page behaviour?

Avatar
zenmonkey

Community Member, 528 Posts

7 February 2010 at 9:38am

You can either extend the Redirector Page type and create your own class the same way you extend any page just instead of Pagetype extends Page you use PageType extends RedirectorPage just make sure you still extend the Page Controller. Or you could copy the contents of Redirector page into a new page type and add any functionality to that