Hi,
I am relatively new to Silverstripe and currently working on a project for site that is selling CD's.
On the site I want to display the track names of each CD on the CD's Product page. So following Tutorial 5 I have so far used the $has_many relationship to link and CD with a track. Meaning that currently When you edit a CD's product page you can add in tracks and then associate them to that CD in the same way Mentors are linked to Students in the tutorial.
However, this isn't ideal for my site as for each CD you can see all available tracks for all CD's, and while you can't add a track to more than one CD it is an unmanageably long list. So, what I am trying to figure out is if there is a way to only show the relevant tracks when editing a CD product page.
The ideal way would be to only show tracks that were added for that CD. So if editing CD One you would only see tracks that were added there and then when editing CD Two you wouldn't see any of the tracks that were added for CD one.
I hope that makes sense and that someone can help point me in the right direction.
Thanks in advance.
Marc
P.s. let me know if you'd like me to post my code, what I have used is the same as tutorial 5 Student - Mentor relation - http://doc.silverstripe.org/sapphire/en/tutorials/5-dataobject-relationship-management