5552 Posts in 1742 Topics by 1226 members
|Go to End|
26 January 2009 at 12:36pm
I'm working up a site for an audio producer who would like a few pages that she can offer some audio samples on. Ideally she'd like to be able to display the content like so:
Title of piece
Being more a designer than developer, not sure how I'd achieve this in the CMS so that she can add these herself. At first I thought a widget might work, but I'm not sure. In a perfect world, I'd like to see a widget that she could enter text into the fields that need it, attach a thumbnail, and attach an mp3 that is linked to the player. I say widget because she's going to have to be adding multiple instances of these on individual pages. But maybe I'm missing something.
Any suggestions, advice, anything? Thanks much.
26 January 2009 at 1:57pm
I think what you are looking for is a complextablefield so that you can add as many audio 'objects' as you want. So it might look something like this:
Then finally in the template Layout/AudioPage.ss, you would have something like this:
<% control AudioItems %>
<a href="$AudioFile.URL" >Download Audio File</a>
<% end_control %>
Of course you might e using a player of somesort in which case you can just put the $AudioFile.URL in the appropriate place
For more info on the different types of relationships you can have in SS check out tutorial 4.
27 January 2009 at 4:32am
Thanks Aram! This looks like it should do exactly what we're hoping for. Will play around with it tonight and let you all now how it works out. Thanks again.
8 October 2009 at 2:45pm
I recently began using silverstripe, so being a designer I mostly piece together things I need to get stuff done here. I came across your code for adding mp3 files with descriptions and stuff and it seems like the perfect solution for what I need. I'm trying to create sermon download section for my church website. I've prepared the files like you have them but I"m having trouble. The AudioItem.php file is good, I get no errors when I run a dev/build. But once I get to the AudioPage.php and run a dev/build it stops half way. I tried my best to figure out where there could be something wrong but I have no clue. Would you or anyone reading this post be able to help me?
|Go to Top|