Jeff Wallace
Aug 24, 2012
  4335
(1 votes)

Alloy Technologies Video Page Type

Based on EPiServer CMS 6 R2 and the Alloy Technologies Templates

Recently I was working with a customer who wanted a nice Video-based Page Type.  In their own search they came across some of the video pages on episerver.com for a few of our Add-ons.  The customer informed me that this was similar to what they were looking for.  Perfect!  Following my typical fashion I figured I could hi-jack most of someone else’s good code and make a useful Page Type.  You know how I love to do that!

I reached out to the EPiServer web team to see if I could take a look at the code.  Of course, they were all sleeping, a few beers closer to sleeping, shoveling snow (it was July in Sweden after all),…or something like that.  I viewed the page source to borrow/steal as much as I could and got my basic page working.  Then I made some additions to suit my needs.  Sebastian Lundh was kind enough to hook me up with the real code the next day so I could review my efforts.  Aren’t we just a happy helpful sharing bunch of colleagues?  Of course!

Anyway, with this I was able to clean up my code slightly and probably make a mess of some other areas. The actual episerver.com code was written by Gregor Oloffson but you can assume anything you don’t like was authored by me! Winking smile

Enough babbling already!  Here’s the result…

This is a Video Page Type designed specifically for the Alloy Technologies templates.  This should be great for demonstrations purposes.  If you want to add it to another site I suggest you install into Alloy and manually move/modify the relevant bits of code. 

The Video Page Type was intended to support either:

  • YouTube videos
    • In which case the thumbnail will be automatically generated for you
  • SWF videos added to the EPiServer File Manager locally
    • In which case you should upload a image to use for the thumbnail

YouTube Video Example

Adding content in Edit Mode

image

 

The resulting page

image

 

The result when clicking the video thumbnail on the right

image

And sure, I know what you’re all wondering…is that me in the video on the board?  It is true that I was able to experience the wonder of Åre last January but alas this is not me.  They must have lost that intense video demonstrating my expert skillset and settled for this clip.

 

SWF Video Example

Adding content in Edit Mode (notice I set the thumbnail Property)

image

 

The resulting page

image

 

The result when clicking the video thumbnail on the right

image

 

This is not intended to be the “end all” Video Page Type and there’s plenty of room for improvements.  However, this should be a good starting point for your Video Page needs and great for demos in Alloy Technologies as is!

Special thanks to Sebastian Lundh for helping me out and Gregor Oloffson for authoring the original code!

 

How do you get it and set it up?

You can download the Nuget package here and install manually: Download.

The Nuget package will put everything needed into your project so you simply need to compile:

  • Video Page Template – the template code for the Page Type
  • Video Master Page – this is essentially a copy of the original Alloy Technologies default Master Page with the fancybox javascript added.  I didn’t want to mess with others master pages but you can of course tweak this how you like
  • fancybox scripts and images – 3rd party tool used for the video.  Be sure to review their licensing agreements, especially if you plan to use this on a commercial site

After that the Page Type needs to be imported to EPiServer.  If you added this to your project via the Nuget package you can find the import file in your sites root directory in a folder called “install”.  To import…

  1. Log in to EPiServer
  2. Navigate to Admin Mode
  3. Select the Admin tab
  4. Scroll down to Tools and select “Import Data”
    1. image
  5. In the right-hand window select the “Browse” button
  6. Select the import file (.episerverdata file) from your sites root directory in a folder called “install”
    1. image
  7. Select the “Begin Import” button
  8. If all goes well the resulting window should indicate 1 Page Type was successfully imported
    1. image

Test it out and enjoy!

Please note, this is intended as a starting point for you to customize for your project needs. The code is provided “as is” without warranty or guarantee of operation. Use at your own risk. Good luck and enjoy!

Aug 24, 2012

Comments

Oct 5, 2012 02:18 PM

Three or four different kinds of awesome!

Please login to comment.
Latest blogs
Boosting Graph Query Performance with Stored Templates

Stored Templates offer a solution by pre-generating and storing translated queries. This bypasses the time-consuming translation process, leading t...

Jonas Bergqvist | Feb 27, 2025

Exploring Optimizely SaaS CMS – What’s New & How to Accelerate your Build

In my latest video, I take a fresh look at Optimizely SaaS CMS , covering some of the recent improvements aimed at enhancing the editor experience....

Minesh Shah (Netcel) | Feb 27, 2025

Adaptive Images with Optimizely CMP

Images from Optimizely CMP can now be seamlessly integrated into Optimizely CMS through Adaptive Images, with the all same features that web editor...

Ted | Feb 27, 2025 |

Using the 1996 text-based Browser 'Links' to optimize website accessibility

Use a text-based browser from the late 1990s to improve the accessibility of your modern Optimizely website!

Tomas Hensrud Gulla | Feb 25, 2025 |

Using the 1996 text-based Browser 'Links' to optimize website accessibility

Use a text-based browser from the late 1990s to improve the accessibility of your modern Optimizely website!

Tomas Hensrud Gulla | Feb 25, 2025 |

Convert media type in a migrationstep

I needed to convert the type for some media files. Suddenly webp files were sent to the CMS from an external system and webp was not added to the...

Jeroen Stemerdink | Feb 24, 2025 |