Show Silverlight Advertisements in Commerce Server
ravikanth | December 16, 2009This blog is continuation to my blog entry “Creating custom display types in commerce server”. In my previous blog entry, I have explained how can we display adobe flash advertisements and in this blog post, I will explain how can we display silver light advertisements in commerce server. The steps are pretty simple –> Each advertisement will store template ID and the properties. Based on the template Id, commerce server loads the template structure are replace tokens with properties and file output is rendered to HTML.
The steps for creating silverlight display type is pretty simple.
1. Create the HTML required to render for silver light: If you are not aware of the HTML structure – open any silverlight website (silverlight.net) in your web browser, go to code behind and copy the silverlight loading object tag – as shown below
|
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> |
2. Identify the properties that needs to get updated from Marketing manager: In this step, we will identify the tokens when are required to get input from the customer. For example, here I have identified following tokens
- Source Param
- Background
- Height
- Width
so, my template structure will become like this
|
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="{%Width%}" height="{%Height%}"> |
3. Create a display template into marketing system: You can find the code block on this blog to create or modify the DisplayTemplate and the URL is http://microsoftblog.co.in/commerceserver/creating-custom-display-types-in-commerce-server/
That’s all… Now you can able to see silverlight template in your marketing system. In coming days, I will try to write a blog entry on how to show Google advertisements in commerce server.