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

    Question

  • 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:

    <object
    data="data:application/x-oleobject;base64,QfXq3+HzJEysrJnDBxUISgAJAABQRwAAAz4AABgAAAB0AHIAYQBuAHMAcABhAHIAZQBuAHQAAAAAAAAAAAAAAAAAAACwAAAAaAB0AHQAcAA6AC8ALwB3AHcAdwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBzAGkAbAB2AGUAcgBsAGkAZwBoAHQALwBjAGEAcwBlAC0AcwB0AHUAZABpAGUAcwAvAEMAbABpAGUAbgB0AEIAaQBuAC8AQwBhAHMAZQBTAHQAdQBkAGkAZQBzAC4AUwBpAGwAdgBlAHIAbABpAGcAaAB0AC4AeABhAHAAAAA8AAAA//8AACYAAABvAG4AUwBpAGwAdgBlAHIAbABpAGcAaAB0AEUAcgByAG8AcgAAAAAAAAAAAAAAAAAAAAAAAACeAAAAQwBvAGwAbABlAGMAdABpAG8AbgBVAFIASQA9AGgAdAB0AHAAOgAvAC8AcwBlAGEAdAB0AGwAZQBmAG8AbwBkAGcAZQBlAGsALgBjAG8AbQAvAHcAcAAtAGMAbwBuAHQAZQBuAHQALwB1AHAAbABvAGEAZABzAC8AQQBsAGkAbgBlAGEALwBBAGwAaQBuAGUAYQAuAGMAeABtAGwAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAGAAAADQALgAwAC4ANQAwADgAMgA2AC4AMAAAAAoAAAB0AHIAdQBlAAAAAAAAAAAAAAAAAAAA"
    width="100%" type="application/x-silverlight-2"
    height="600"><param name="source" value="http://www.microsoft.com/silverlight/case-studies/ClientBin/CaseStudies.Silverlight.xap"><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="http://www.microsoft.com/getsilverlight"
    target="_blank"><br>           
    <img alt="Get Microsoft Silverlight" src="http://go.microsoft.com/fwlink/?LinkId=161376"><br>     
    </a><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