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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Showing only related object with HasManyDataObjectManager

Go to End



Community Member, 75 Posts

24 March 2011 at 2:27am

Hi guys,

Does anyone know if there's quick hack to show only related objects with HMDOM?

I've got a scenario where I have hundreds of recipe entries which can be linked through ModelAdmin as "featured" on the homepage, so homepage has has_many relationship with recipes, and recipes has_one homempage.

However, to streamline the updating of the site, the administrator would like to be able to unlink straight from the homepage without going through ModelAdmin.

Using an HMDOM allows them to do this - but lists ALL the recipes in the database which they don't need, and I'd like to only display the ones which are related to the homepage.