# Newb needs help embedding single video in a folder

**URL:** <https://forum.getkirby.com/t/newb-needs-help-embedding-single-video-in-a-folder/8909>\
**Category:** Questions\
**Tags:** v2\
**Created:** [November 1, 2017, 12:02am UTC](https://forum.getkirby.com/t/newb-needs-help-embedding-single-video-in-a-folder/8909 "2017-11-01T00:02:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_datsun](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@mr\_datsun](https://forum.getkirby.com/u/mr_datsun)\
**Post date:** [November 1, 2017, 12:02am UTC](https://forum.getkirby.com/t/newb-needs-help-embedding-single-video-in-a-folder/8909/1 "2017-11-01T00:02:39Z")

</div>

Years ago I managed to create some templates like photo.php and default.php which allow me to drop photos in folders and have them displayed with little extra work.

Today I cannot work out how to approach a simple folder-page that shows a single video. I’ll probably use vimeo-based videos if it makes it easier.

Could someone tell me what I need to learn to do this please? I find it baffling now – a folder, a text document, a plugin?

I found some short bits of code like this

(vimeo: [I&#039;m on a Boat](http://vimeo.com/3432886) caption: This is a really nice video)

but I have no idea where to put them.

Thank-you

---

<div class="post-metadata">

**Author:** ![pedroborges](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/pedroborges/32/7038_2.png) [@pedroborges](https://forum.getkirby.com/u/pedroborges)\
**Post date:** [November 1, 2017, 12:22am UTC](https://forum.getkirby.com/t/newb-needs-help-embedding-single-video-in-a-folder/8909/2 "2017-11-01T00:22:00Z")

</div>

Hi @mr_datsun!

> [@mr\_datsun](#):
>
> (vimeo: [http://vimeo.com/3432886](http://vimeo.com/3432886) caption: This is a really nice video)

This is called Kirby Tag and can be used on any text field that is echoed on the template using the `kirbytext()` method.

You can find more info about the built-in Vimeo Kirby Tag at: [https://getkirby.com/docs/cheatsheet/kirbytags/vimeo](https://getkirby.com/docs/cheatsheet/kirbytags/vimeo)

I would recommend the above method in situations where you want to add a video here and there. If you’ll always have a Vimeo video to that page type, add a dedicated field to the blueprint and use it on the template. Here’s an example to help you get started:

```yaml
# site/blueprints/video.yml

title: Page

fields:
  title:
    label: Title
    type: text

  vimeo:
    label: Vimeo Video ID
    type: url

```

And for the template:

```php
<!-- site/templates/video.php -->
<?php snippet('header') ?>

  <main class="main" role="main">

    <header class="wrap">
      <h1><?= $page->title()->html() ?></h1>
    </header>
      
    <div class="text wrap">
      <iframe src="https://player.vimeo.com/video/<?= $page->vimeo() ?>" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
    </div>

  </main>

<?php snippet('footer') ?>

```

---

<div class="post-metadata">

**Author:** ![mr\_datsun](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@mr\_datsun](https://forum.getkirby.com/u/mr_datsun)\
**Post date:** [November 1, 2017, 1:07am UTC](https://forum.getkirby.com/t/newb-needs-help-embedding-single-video-in-a-folder/8909/3 "2017-11-01T01:07:06Z")

</div>

Hi pedro

So helpful. Thank-you. Yes – it was printing stuff into the template with kirbytext(). It began to come back to me as I looked at my old templates to see how it worked. I got the video up with title and description in a jiffy. Video.php:

```
<?php snippet('header') ?>
<?php snippet('menu') ?>
<?php snippet('submenu') ?>

<section class="content">

  <article>
	<h1><?php echo html($page->title()) ?></h1>
   	 <?php echo kirbytext($page->text()) ?>
        <?php echo kirbytext("(vimeo: http://vimeo.com/122808703 caption: XXXXXX)") ?>
  </article>

</section>

<?php snippet('footer') ?>

```

I have also just upgraded to Kirby 2 in the last day or two, so later I will read up about blueprints and as I add more videos try them as you suggested. Again many thanks!

Not sure how to mark this as solved…

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:31pm UTC](https://forum.getkirby.com/t/newb-needs-help-embedding-single-video-in-a-folder/8909/4 "2025-02-06T17:31:48Z")

</div>

Archived on February 6, 2025, 5:31pm UTC


