Well still buzzed about attending MODxpo and thought I’d wade deep into creating my first few snippets from scratch. Unfortunately I’ve not be able to search out an answer on this. It’s one of those, I can see the problem but not quite grasp yet. I am making a snippet for a client’s site that will have multiple podcast on the same page. So far here is my code:
Snippet:
<?php
$output = ''; // clear output
$modx->setPlaceholder('playername', $playername);
$modx->setPlaceholder('webcast', $webcast);
$modx->setPlaceholder('webcasttitle', $webcasttitle);
$output .= $modx->getChunk('podcast');
return $output;
?>
And I am calling it with this:
[!podcast? &playername=`b2bIntegration` &webcast=`b2bpodcast.mp3` &webcasttitle=`Simplifying B2B Integration for Distributors` !]
It works beautifully for one single podcast the issue I have is when I have more than one podcast on the same page. I can tell it’s taking the parameters from the second call and using those for each time it’s called. Think I’m getting over my head a bit but it’s one good way to learn. Unfortunately I’ve not been able to dig around on my own to find an answer to this. Any help pointing me in the right direction would be great!
Thanks.