2510 Posts in 675 Topics by 520 members
Data Model Questions
SilverStripe Forums » Data Model Questions » Conditional redirect page for seasons
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 1097 Views |
-
Conditional redirect page for seasons

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
-WinterSeasonal-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 -> springIs it possible to alter/override the redirector page behaviour?
-
Re: Conditional redirect page for seasons

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
| 1097 Views | ||
|
Page:
1
|
Go to Top |

