Customize Vimeo Embeds


I am searching for a clean solution to embed a Vimeo Clip without the titles, without the byline and a custom color.

The share button on vimeo generates this code:
<iframe src="" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

I know I could somehow change the embed.php Kirby Core File - but is there a cleaner way of doing this?


You can overwrite the vimeo Kirbytag in a plugin file (like site/plugins/vimeo/vimeo.php):

kirbytext::$tags['vimeo'] = array(
  'attr' => array(
  'html' => function($tag) {

    $caption = $tag->attr('caption');

    if(!empty($caption)) {
      $figcaption = '<figcaption>' . escape::html($caption) . '</figcaption>';
    } else {
      $figcaption = null;

    return '<figure class="' . $tag->attr('class', kirby()->option('', 'video')) . '">' . YOUREMBEDCODE . $figcaption . '</figure>';


Thanks for the quick answer! I give it a try!

I tried it and it works with Kirbtext embeds, but I asked the wrong question - sorry.

I am using the Template helper.

$videolink = $page->reel()->text();

<div class="videocontainer">
   <?php echo vimeo($videolink) ?>

The User provides the Vimeo URL in the panel.

Well, then it’s even easier: Simply put your iframe code right there instead of using the helper. :slight_smile:

Ha, thanks. :grinning:

I already thought about that, but i would like to give the client the possibility to change the URL himself in the panel. Thats why I am using the $videolink…

Yes, but you can put the iframe code into the template and make the src attribute dynamic by putting in the link from the link field.

Wow - sometimes I just think to complicated. Thanks