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.

Customising the CMS /

Page list optionfield


Reply


2 Posts   1642 Views

Avatar
Sec

Community Member, 13 Posts

7 January 2009 at 9:45pm

Hi!

I have the following line:
$fields->addFieldToTab('Root.Content.Main', new OptionsetField('Link', 'Link to page:', DataObject::get('Page'),'URLSegment'));

This list all the pages on my site, only I don't want the list to output the page type (like Page, Article Page, Image Page etc.), but the page URLSegment. How can I get the URLSegment of each page insted where the DataObject::get('Page') is now?            

Avatar
Sec

Community Member, 13 Posts

7 January 2009 at 9:56pm

Edited: 07/01/2009 9:56pm

Found the solution. Logically you can do DataObject::get('Page')->column('Title') or DataObject::get('Page')->column('URLSegment') to solve this :)