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.

Customising the CMS /

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

DataObject identifier


Go to End


3 Posts   810 Views

Avatar
mi32dogs

Community Member, 75 Posts

5 July 2015 at 5:45pm

Hi Quick question,

I have 2 dataObjects, a photo gallery and a press release one.

If I go and edit an photo gallery on top line in the photo gallery I get the dataobject name and the gallery name (Photo Gallery / Botswana- King's Pool, Vumbura Plains, Mombo) but in the press release one I get the dataObject and the ID (Press Release / #11) how do I get the name instead of the ID in the Press Release section?

thanks

Avatar
Pyromanik

Community Member, 419 Posts

5 July 2015 at 9:05pm

Edited: 05/07/2015 9:10pm

Implement public function getTitle() in your #ID'd object's class.

Avatar
mi32dogs

Community Member, 75 Posts

6 July 2015 at 4:31am

Thanks Pyromanik,

That works great, you seem to answer all my questions, thanks