Do you want to beautify the URL’s that you embed in Ektron contents?
Don’t want to come outside of your Ektron workarea?
This custom smart desktop widget is for you!
This blog post is about a simple smart desktop widget.This Ektron smart desktop widget makes use of Twitter BootStrap frontend framework for the User Interface design.The functionality of this smart desktop widget is url shortening.
The idea is to make use of Google’s Url shortening service in Ektron. This can be done by making a POST request to the shortening service. The response can be deserializatied to a response class in order to retrieve the desired short url.
I made use of Twitter Bootstrap for the frontend development.
- Downloading the BootStrap: http://twitter.github.com/bootstrap/
- Adding the BootStrap files in the Ektron website.
- Refering the Bootstrap files in Widget Page
- Making use of Built-in Bootstrap classes for the widget elements.
I referred these bootstrap files in my widget page:
[gist https://gist.github.com/Bisileesh/5425049 /]
I also referred:
[gist https://gist.github.com/Bisileesh/5425053 /]
The widget panel looks like the following:
[gist https://gist.github.com/Bisileesh/5425054 /]
These built-in bootstrap classes gave a charm to my Ektron smart desktop widget.
And it looks like this:
[gist https://gist.github.com/Bisileesh/5425057 /]
Here in order to get the short url,a POST request is made to the google url shortening service url ,https://www.googleapis.com/urlshortener/v1/url.
The JSON response is parsed by deserializating the JSON string to a class. System.Runtime.Serialization namespace is made use for this purpose.