Go to content

How to add the YouTube plugin in Hippo CMS 7

Published on

The YouTube Template Plug-in is a very small, but cool project in the Hippo ECM forge. The plugin was created by our former intern Jeroen Tietema. With this plug-in you can easily add YouTube videos to your documents. In this blog I'll explain how to add this plug-in into your Hippo ECM project. I assume you have already checked out and built Hippo ECM from source.

Check out the YouTube plug-in from SVN and build it using Maven with the following command:

mvn install

Then add the dependency to the pom.xml of quickstart/war:

<!-- YouTube Template plugin for Hippo ECM 2.03.00 -->
<dependency>
<groupId>org.onehippo.addon.frontend.youtube</groupId>
<artifactId>youtube-plugins</artifactId>
<version>1.01.00-SNAPSHOT</version>
<type>jar</type>
</dependency>

Configuration in the console

(Re)start the Hippo ECM war and go to the console on http://localhost:8080/cms/console

Hippo ECM Console
Hippo ECM Console

Navigate to the following location:

/hippo:namespaces/hippo/templatetype/hippo:template/hippo:template/list

Now add the value Youtube to the templates property and save the changes. Make sure you log out of the CMS and back in (the list is cached in your session).

CMS template editor

Go to the template editor in the CMS. You can either create a new document type or add the new YouTube field to an existing template. Save the template and choose "Update all content" from the drop down menu in the top bar.

Template editor
Template editor

Editor

Now the plug-in has been configured and added to the template, the CMS users can add YouTube videos to their documents. Paste the ID of the video into the YouTube field. If you are not editing the document you get a preview of the selected video.