Hi Kleist,
Thanks for the response
create a separate template-chunk for each.
You mean i should make a seperate chunk for each .flv?
I don’t think I can make additional chunks as the snippet calls the chunk to run the movie (that’s my undrstanding of it - but I am probably wrong as I am relativley new to Modx)
the snippet is (from Author: Nick Fritzkowski www.naf.com.au):
*/
//Set default params
$rnflv_mp3_file = isset($flv_mp3_file) ? $flv_mp3_file : 'video_name.flv';
$rnwidth = isset($width) ? $width : '230';
$rnimage = isset($image) ? $image : '';
$rnallowfullscreen = isset($allowfullscreen) ? $allowfullscreen : 'true';
$rntype = isset($type) ? $type : 'flv';
[b]
$rncustom_chunk = isset($custom_chunk) ? $custom_chunk : 'flv_mp3_chunk';[/b]
//set default params (styles and colors)
$rnbackcolor = isset($backcolor) ? $backcolor : 'FFFFFF';
$rnfrontcolor = isset($frontcolor) ? $frontcolor : '000033';
$rnlightcolor = isset($lightcolor) ? $lightcolor : '000033';
$rnscreencolor = isset($screencolor) ? $screencolor : '000000';
//set settings defendant on type
if($rntype == 'flv') {
//set flv height if nothing specified
$rnheight = isset($height) ? $height : '200';
$modx->setPlaceholder('displayheight', '&displayheight='.$rnheight);
} else {
//set 20 pixel height if nothing specified
$rnheight = isset($height) ? $height : '20';
}
// Set placeholders
$modx->setPlaceholder('flv_mp3_file', $rnflv_mp3_file);
$modx->setPlaceholder('height', $rnheight);
$modx->setPlaceholder('width', $rnwidth);
$modx->setPlaceholder('image', $rnimage);
$modx->setPlaceholder('allowfullscreen', $rnallowfullscreen);
// Set placeholders (style and colors)
$modx->setPlaceholder('backcolor', $rnbackcolor);
$modx->setPlaceholder('frontcolor', $rnfrontcolor);
$modx->setPlaceholder('lightcolor', $rnlightcolor);
$modx->setPlaceholder('screencolor', $rnscreencolor);
// Return the chunk
return $modx->getChunk($rncustom_chunk);
?>
And the snippet calls this chunk:
<embed
src="assets/snippets/flv_player/player.swf"
width="[+width+]"
height="[+height+]"
allowscriptaccess="always"
allowfullscreen="[+allowfullscreen+]"
flashvars="height=[+height+]&width=[+width+]&file=[+flv_mp3_file+]&image=[+image+]&backcolor=0x[+backcolor+]&frontcolor=0x[+frontcolor+]&lightcolor=0x[+lightcolor+]&screencolor=0x[+screencolor+][+displayheight+]"
/>
To my understanding your other suggestion would work better in this case... how would i prefix the placeholders OR replace them manually?
Sorry to be a noob but I recently made the jump from Joomla to Modx and the concepts are so diffferent.
thanks