1284 Posts in 355 Topics by 487 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1098 Views |
-
Multiple Page Types

21 April 2011 at 12:18pm
I'm wanting to create a page that is a Redirector page but also has a custom page template. I know I can do this by creating a new CMS field but I really want to avoid this as the website is over-complicated already.
Is there any way that a page can be both a RedirectorPage and a custom Page?
-
Re: Multiple Page Types

8 June 2011 at 7:42pm
Is there any way that a page can be both a RedirectorPage and a custom Page?
Use SiteTreeDecorator to decorate the RedirectorPage or subclass the RedirectorPage class with your custom class.
<?php
class CustomRedirectorPage extends RedirectorPage {
//.. your custom code.
}class CustomRedirectorPage_Controller extends RedirectorPage_Controller {
}
-
Re: Multiple Page Types

8 June 2011 at 7:44pm
so if I understand... you want a page that is sometimes a redirectorpage and an othet time a normal page? In that case just switch from page type in the behaviour tab.
If you want to have all the functionality in one page, let me know. I already made something like that!
| 1098 Views | ||
|
Page:
1
|
Go to Top |



