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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Changing the Search Results in a GridField RelationEditor


Go to End


3 Posts   1145 Views

Avatar
Adesso

Community Member, 10 Posts

17 September 2014 at 9:40pm

Edited: 18/09/2014 8:17pm

For the setup code, please reffer to Articles that only have relations to Other Pages

When creating a Holding Page and then a Article page it gets linked to each other automatically, this is great. Once the Article then gets manually removed, one can search the page again in the top search function to find it based on the Heading text, the problem is however that the result only return the ID, and not the Heading text.

How would I get the Heading text to display in the Helper dropdown ?

Avatar
apiening

Community Member, 60 Posts

18 September 2014 at 6:00am

Edited: 18/09/2014 9:28am

Hi Adesso,

thats odd. I would expect this behaviour if your articles where just DataObjects, because SS simply has no better way to label DataObejcts whithout a title or name field. You would create a getTitle method to return what ever you want the title of your DO to be. But Pages and their decendants should be displayed with their titles. Can you show some code?

Cheers

Andy

Avatar
Adesso

Community Member, 10 Posts

18 September 2014 at 7:39pm

Edited: 18/09/2014 8:17pm

Hi apiening,

since the switch to the new Forums, my BB url linking is not really working anymore, the code for this setup is in the Original post:
http://www.silverstripe.org/community/forums/general-questions/show/74434#post372411