How to add the YouTube plugin in Hippo CMS 7
The YouTube Template Plug-in is a very simple, 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:
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
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.
If you are not editing the document you get a preview of the selected video: