Jump to:

1385 Posts in 493 Topics by 522 members

Themes

SilverStripe Forums » Themes » Multiple Page Types

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1382 Views
  • jaedb
    Avatar
    Community Member
    5 Posts

    Multiple Page Types Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5511 Posts

    Re: Multiple Page Types Link to this post

    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 {

    }

  • hammuh
    Avatar
    Community Member
    15 Posts

    Re: Multiple Page Types Link to this post

    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!

    1382 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.