Easy trick to embed a Pivot viewer with no coding, compiling, or .aspx!


  • I really wanted to embed a Pivot viewer on my Wordpress site, but I didn't want to go to the trouble of downloading Visual Studio and building a Silverlight project, then have to stand up IIS somewhere and create an ASPX page.  So, I found a clever solution.  I don't know if this is a repost, but this took my time-to-publish from several hours to a few seconds.


    The trick is to just reuse the CaseStudies XAP file from the Silverlight site, and point it to your own collection.  I made my collection with the Excel plugin and put the published cxml file and corresponding folder in a public location on my site.  Then, I copied the embed code from the Case Studies page and changed the collection parameter to point to my own.  Here's the embed code, for reference:

    width="100%" type="application/x-silverlight-2"
    height="600"><param name="source" value=""><param
    name="onError" value="onSilverlightError"><param
    name="background" value="transparent"><param
    name="windowless" value="true"><param
    name="minRuntimeVersion" value="4.0.50826.0"><param
    name="autoUpgrade" value="true"><a
    style="text-decoration: none;" href=""
    <img alt="Get Microsoft Silverlight" src=""><br>     
    <!-- This is ASP.NET code
    behind accessible object to add the configuration --><param
    name="InitParams" value="CollectionURI=ENTER YOUR URL HERE"></object>

    Monday, October 17, 2011 11:33 PM

All replies

  • not bad, I did a similar thing to easily throw DeepZoom onto our sharepoint site after our admin wasn't sure if it could done without changing permissions.

    Tuesday, October 18, 2011 11:35 AM