Hello to the Drupal Pros,
My website provides MP3 programs and the script text of the programs we create. I am using the audio module to manage the audio files for playback on the site, stat tracking, and podcast management. I have a separate content type Script that displays the text of those audio files. The podcast files will get deleted after a certain amount of time to save disk space, but the script text will stay online, thus the need for separate content types (I think).
I've created a common input field with CCK called Program ID to identify the Script node and MP3 file (Audio node) for both types.
What would be the best method for having 1 page that combines the Script node and the Audio node when they are both available or only displaying the Script node when there is no Audio file? It would make sense to me if the Audio part was a block with a custom location, but I don't know how to call just 1 piece of information into that block based on the script page I'm on (that is - just the audio file for that particular script)
It is my understanding that the Views module is more for handling pages with multiple nodes (lists and such). Should/can this be done with Views or should I be looking for something else? Is separating the Scripts from the Audio files the best way to go?
How would I pass a CCK field into the URL argument (ie: mysite.com/script?programid=672).
Any experts out there that have an idea or could point me in the right direction? Thanks.
Comments
A couple of ways to go
There are a few different ways to go about this. One way to go would be to create a third content type for the program, that used the node reference field that comes with CCK to pull in the script and MP3. Once you delete the MP3 the program piece of content will just have the script on it.
The other way would be to create a view that pulls both of the items in dynamically and doesn't require a MP3 to always be there to display. I feel like this option will take some custom argument handling code in views to really get this working properly.
If you are going to need the URL argument for something else on the page, you can do this with views, otherwise, you can use something like pathauto if you just want the URL to contain the information, but don't need to use it for anything.