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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

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

Confused about 2.4 / nested Urls / display DataObject


Go to End


1790 Views

Avatar
rob.s

Community Member, 78 Posts

7 May 2010 at 11:19pm

Hi Forum,

here is my issue:
SS 2.4.0 rc3

Nested URls are enabled.
On a custom Pagetype there is a method 'details', that should display a DataObject Record.

Because of using nested URLs the URL can be:
/level1/level2/level3/details/my-object-urlsegment

inside the Controller

    public function details()
    {

        //$UrlSegment = Director::URLParam('ID');
        // Line above does not work - content of $URLSegment is 'level3'

       // the following line works - but why ?
      $UrlSegment = $this->getRequest()->param('ID');

    }
{/code]

Greetings,
Robert