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.

Archive /

Our old forums are still available as a read-only archive.

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

TreeDropdownField()


Go to End


1188 Views

Avatar
OzziNL

Community Member, 37 Posts

28 December 2007 at 10:50am

Edited: 28/12/2007 11:16am

Hello,
I have a page type with some fields and one of the fields should be a url to another page in the tree. I use:

$fields->addFieldsToTab('Root.Content.Banners', new TreeDropdownField('Banner1Url','Link','SiteTree','URLSegment'));

This works fine but when saved and I return to the page I get an error as attached. It tries to do a get_by_id with the non-nummeric URLSegment. Am I doing something wrong?

Thanks a lot...