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:

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

how do I add attributes to a many-many relationship?

Go to End

3 Posts   723 Views


Community Member, 22 Posts

22 October 2011 at 7:47am

I have a many-many relationship between BookPage and AuthorPage. That's working well enough--I can add authors to books; books appear on author pages; authors are listed on their book pages.

I need to add an attribute to some of the authorships, but not to the authors themselves (someone might be the author of one book, the editor of another, the illustrator of a third).

Authors are coming in on a checklist in the CMS when looking at a BookPage. What I'd like is to have a dropdown menu beside each one where you'd select the role each author played.

I tried adding Roles to the Authors tab on BookPage, but couldn't get it to show up by each author; instead it showed up once at the bottom.

I'm probably going about this wrong. What is the best way to do this?


Forum Moderator, 1899 Posts

23 October 2011 at 12:52am

Hi John,

Welcome to the forums,

I've never done this, but you might want to search and read around "many_many_extraFields" this seems to be to do with what you are asking.



Community Member, 22 Posts

29 October 2011 at 12:35pm

Thanks, swaiba. I'll look into that some more; right now I'm having a bit of trouble wrapping my head around it, so I've moved onto other things. That *does* look like it could do what I need, though.