Jump to:

5537 Posts in 1737 Topics by 1223 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Redirect to deeply nested Page

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

Page: 1
Go to End
Author Topic: 841 Views
  • Ironcheese
    Community Member
    33 Posts

    Redirect to deeply nested Page Link to this post

    Hey there,

    how can i redirect from a Controller to a deeply nested Page with only its URLSegment available?

    My requested pages will all have the same pattern:

    I get the PageObject of my project. So far so good. But the URLSegment of my PageObject is just "project" and not "/maincategory/subcategory/project". So my redirects aint working properly.

    Any suggestions?

    EDIT: i'm using 2.4 with nestedURLs enabled...

  • Willr
    Forum Moderator
    5497 Posts

    Re: Redirect to deeply nested Page Link to this post

    If you have the Page object then you can call a method Link() on it which generates for you the actual nested link.

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.