Hi, I am trying to create a snippet that change the size of a video automatically.
My snippet is called
youtube
<?php
$Input = $modx->getTemplateVarOutput('video-01');
$Input = $Input['video-01'];
$Input= preg_replace('/width="640"/', 'width=570', $Input);
$Input= preg_replace('/height="505"/', 'height=338', $Input);
$Input= preg_replace('/width="480"/', 'width=570', $Input);
$Input= preg_replace('/height="390"/', 'height=338', $Input);
return $Input;
?>
the html: [[youtube]]
The problem is that I have 30 template variables, named video-01,video-02,video-03 and so on, so I would like to
put the TV inside the snippet call, like this [[youtube? &Input=`[*video-01*]`]].
I have already tried but it doesn’t work. it returns stuff like this
<object widt"
><object widt >
Does anyone have any idea or suggestion?