EDIT: I tried to delete the posting, because after further thought it is possible that an album will have tracks by different composers - so setting up composer for each track is a GOOD thing!
I'm wondering if this is possible - it is a new question in connection with my previous posting - https://www.couchcms.com/forum/viewtopic.php?f=4&t=11214
I have set up the templates for tracks.php and albums.php as suggested by KK - with a many to one relationship, and I like how this presents in the Admin Panel - very clear and easy for the client to set up an album and its associated tracks.
I have another template called composer.php with a many to many relationship to albums.php to enable the client to select a composer when creating a new album.
The workflow is: 1. create a composer 2. create an album and select composer(s) from the list 3. create the tracks for the album.
However, there is also a requirement to list tracks by composer and I'm not sure how to most effectively and efficiently do this. I thought I would use the cms:pages tag to list all tracks by a composer:
Clearly, this requires that each track has the composer set up as an editable field. I know that I could create a many to many relationship between tracks.php and composer.php (a track could have more than one composer) - as I have already created between albums.php and composer.php - but that would require the client to select the composer for the album and then for each album track he would have to select the composer again. This seems a bit repetitive and user-unfriendly (e.g. if he made a mistake with the composer - it would require changing in several places rather than just a single place).
The albums.php cloned page is created with a relationship to one or more of the cloned pages of composers.php. The next step is to create cloned pages of tracks.php with a many to one relationship to albums.php - is there any way of getting hold of the composer info at this stage and auto-populating an editable region composer_name in tracks.php or creating a relationship between tracks.php and composer.php?
I hope my question is clear! And thanks for any advice forthcoming ...
I'm wondering if this is possible - it is a new question in connection with my previous posting - https://www.couchcms.com/forum/viewtopic.php?f=4&t=11214
I have set up the templates for tracks.php and albums.php as suggested by KK - with a many to one relationship, and I like how this presents in the Admin Panel - very clear and easy for the client to set up an album and its associated tracks.
I have another template called composer.php with a many to many relationship to albums.php to enable the client to select a composer when creating a new album.
The workflow is: 1. create a composer 2. create an album and select composer(s) from the list 3. create the tracks for the album.
However, there is also a requirement to list tracks by composer and I'm not sure how to most effectively and efficiently do this. I thought I would use the cms:pages tag to list all tracks by a composer:
- Code: Select all
<cms:pages masterpage='tracks.php' custom_field='track_composer==<cms:show composer_name />'></cms:pages>
Clearly, this requires that each track has the composer set up as an editable field. I know that I could create a many to many relationship between tracks.php and composer.php (a track could have more than one composer) - as I have already created between albums.php and composer.php - but that would require the client to select the composer for the album and then for each album track he would have to select the composer again. This seems a bit repetitive and user-unfriendly (e.g. if he made a mistake with the composer - it would require changing in several places rather than just a single place).
The albums.php cloned page is created with a relationship to one or more of the cloned pages of composers.php. The next step is to create cloned pages of tracks.php with a many to one relationship to albums.php - is there any way of getting hold of the composer info at this stage and auto-populating an editable region composer_name in tracks.php or creating a relationship between tracks.php and composer.php?
I hope my question is clear! And thanks for any advice forthcoming ...