At the EPiServer Partner Summit I was chatting over dinner to Andy Brodie of Networked Planet. He was remarking that it would be nice within EPiServer to have the capability to show site thumbnails when you hovered over hyperlinks. This intrigued me so when I got back to the UK I did some investigation. There are sites on the internet that do provide a service for this, such as websnapr, but ideally I wanted something that I had full control over.

Time to start coding :)

After some investigation on the web I found a great article about the WebBrowser control and ASP.NET. I tailored it to my needs and got a little thumbnail generator working. I also built a set of JavaScript functions that would show the thumbnails on hyperlinks using DHTML. Next I built a Control Adapter that would pick up EPiServer properties and parse them for hyperlinks. If it found hyperlinks it would insert references to my JavaScript functions. Lastly I wrapped all this in an assembly complete with my Single-Assembly VPP method and using dynamic web resource references.

And so HyperThumbnail was born. Go check it out on EPiCode or see the sample on B&D EPiLabs (hover over the hyperlinks in the content). Deploying to your own site couldn't be easier - simply drag-and-drop the DLL and a .browser file into your website folders.


Bookmark with :
Digg It! DZone StumbleUpon Technorati Reddit Del.icio.us Newsvine Furl Blinklist
posted @ Tuesday, June 10, 2008 1:13 PM | in .NET/C# EPiServer

Comments

Gravatar
# re: New module on EPiCode
Posted by Allan Thraen
on 6/10/2008 1:53 PM
Dan, this is awesome! I was looking into doing something similar a few months ago and got the thumbnail bit working, but then had to move on to other projects. I really like your packaging and easy deployment! Great idea and great module!
Gravatar
# re: New module on EPiCode
Posted by bzlm
on 6/10/2008 9:52 PM
Quoting MSDN; "The WebBrowser control is resource-intensive. Be sure to call the Dispose() method when you are finished using the control to ensure that all resources are released in a timely fashion". I noticed SiteThumb.cs doesn't do this explicitly, which means the itty bitty thumbnail committee will linger, right?
Gravatar
# re: New module on EPiCode
Posted by Dan Matthews
on 6/13/2008 8:49 AM
bzlm, possibly... I reworked that file a few times and might have missed off the Dispose. But it's on EPiCode so someone else can fix that. Maybe you? :)
Gravatar
# re: New module on EPiCode
Posted by Andy Brodie
on 6/17/2008 4:59 PM
That's great stuff there. In addition to being a cool little tool it's also a great example of how you can put tools like this in to neat distributables and hook them in to existing solutions.

It'll be in the EasySearch demo soon!

Post Comment

Title *
Name *
Email
Url
Comment *  


Please add 5 and 5 and type the answer here: