One note. I needed to feed the gallery (category) pages with a flash object invocation. That part is easy. just past the HTML (really JS code) into an Xmlpackage, called entity.tiltviewer.xml.config and assign the galleries to that.
Code:
<?xml version="1.0" standalone="yes" ?>
<package version="2.1" displayname="Tiltviewer Gallery - Load the Flash" debug="false" includeentityhelper="true">
<!-- ###################################################################################################### -->
<!-- Copyright AspDotNetStorefront.com, 1995-2008. All Rights Reserved. -->
<!-- http://www.aspdotnetstorefront.com -->
<!-- For details on this license please visit the product homepage at the URL above. -->
<!-- THE ABOVE NOTICE MUST REMAIN INTACT. -->
<!-- -->
<!-- ###################################################################################################### -->
<PackageTransform>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
<xsl:output method="html" omit-xml-declaration="yes" />
<xsl:param name="EntityID"><xsl:value-of select="/root/Runtime/EntityID" /></xsl:param>
<xsl:template match="/">
<style type="text/css">
.tablebackground { background:url(images/topicbg/default.jpg) no-repeat; }
</style>
<script type="text/javascript" src="jscripts/swfobject.js"></script>
<div id="flashcontent">TiltViewer requires JavaScript and the latest Flash player. <a href="http://www.macromedia.com/go/getflashplayer/">Get Flash here.</a></div>
<script type="text/javascript">
var fo = new SWFObject("TiltViewer.swf", "viewer", "880", "630", "9.0.28", "#000000");
// TILTVIEWER CONFIGURATION OPTIONS
// To use an option, uncomment it by removing the "//" at the start of the line
// For a description of config options, go to:
// http://www.airtightinteractive.com/projects/tiltviewer/config_options.html
//TRANSPARENT OPTIONS
fo.addParam("wmode", "transparent");
fo.addVariable("bkgndTransparent", "true");
fo.addVariable("showFullscreenOption", "true");
//FLICKR GALLERY OPTIONS
// To use images from Flickr, uncomment this block
//fo.addVariable("useFlickr", "true");
//fo.addVariable("user_id", "");
//fo.addVariable("tags", "jump,smile");
//fo.addVariable("tag_mode", "all");
//fo.addVariable("showTakenByText", "true");
// XML GALLERY OPTIONS
// To use local images defined in an XML document, use this block
fo.addVariable("useFlickr", "false");
//fo.addVariable("xmlURL", "http://www.imoj.com/tiltviewer/examples/gallery.xml");
fo.addVariable("xmlURL", "http://www.imoj.com/x-tiltviewerdata.aspx?entityid=<xsl:value-of select="$EntityID"/>");
fo.addVariable("maxJPGSize","900");
//GENERAL OPTIONS
fo.addVariable("useReloadButton", "false");
fo.addVariable("columns", "4");
fo.addVariable("rows", "3");
fo.addVariable("showFlipButton", "true");
//fo.addVariable("showLinkButton", "true");
//fo.addVariable("linkLabel", "View image info");
//fo.addVariable("frameColor", "0xFFFFFF");
//fo.addVariable("backColor", "0xDDDDDD");
//fo.addVariable("bkgndInnerColor", "0xFF00FF");
//fo.addVariable("bkgndOuterColor", "0x0000FF");
//fo.addVariable("langGoFull", "Go Fullscreen");
//fo.addVariable("langExitFull", "Exit Fullscreen");
//fo.addVariable("langAbout", "About");
//PRO OPTIONS
fo.addVariable("frameWidth", "30");
fo.addVariable("zoomedInDistance", "900");
fo.addVariable("zoomedOutDistance", "4000");
//fo.addVariable("fontName", "Times");
//fo.addVariable("titleFontSize", "90");
//fo.addVariable("descriptionFontSize", "32");
//fo.addVariable("linkFontSize", "41");
//fo.addVariable("linkTarget", "_self");
//fo.addVariable("navButtonColor", "0xFF00FF");
//fo.addVariable("flipButtonColor", "0x0000FF");
//fo.addVariable("textColor", "0xFFFFFF");
//fo.addVariable("linkTextColor", "0x000000");
//fo.addVariable("linkBkgndColor", "0xFFFFFF");
// END TILTVIEWER CONFIGURATION OPTIONS
fo.addParam("allowFullScreen","true");
fo.write("flashcontent");
</script>
</xsl:template>
</xsl:stylesheet>
</PackageTransform>
</package>
So now the galleries all spit out a flash gallery viewer invocation, but the flash object then needs to call back to get the gallery picture (product) data in Xml, So I wrote another package called tiltviewerdata.xml.config, and set that flash object to invoke that.
Some notes on that gallerydata XmlPackage:
it has to be invoked with x- syntax (e.g. x-tiltviewerdata.aspx?entityid=N). the x- syntax strips out all skin base stuff, which of course would not work if the XmPackage is trying to return a raw Xml Doc (which the flash object needs).
Secondly, inside the tiltviewerdata XmlPackage, we have to set the HTTP Header element, so we know how to tell the browser what kind of data we are returning
Code:
<HTTPHeaders>
<HTTPHeader headername="Content-Type" headervalue="text/xml" />
</HTTPHeaders>
This element goes at the same level as the PackageTransform level
e.g.
tiltviewerdata.xml.config (dummy copy, not using real data as posted here, meaning it's not yet hooked up to do the proper entity-product SQL queries, and transform that to this same output, this one is still using canned dummy data)
Code:
<?xml version="1.0" standalone="yes" ?>
<package version="2.1" displayname="Tiltviewer Gallery Xml Data - Feed The Flash" debug="false" allowengine="true" includeentityhelper="false">
<!-- ###################################################################################################### -->
<!-- Copyright AspDotNetStorefront.com, 1995-2008. All Rights Reserved. -->
<!-- http://www.aspdotnetstorefront.com -->
<!-- For details on this license please visit the product homepage at the URL above. -->
<!-- THE ABOVE NOTICE MUST REMAIN INTACT. -->
<!-- -->
<!-- ###################################################################################################### -->
<HTTPHeaders>
<HTTPHeader headername="Content-Type" headervalue="text/xml" />
</HTTPHeaders>
<PackageTransform>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
<xsl:output method="xml" omit-xml-declaration="no" />
<xsl:param name="EntityID"><xsl:value-of select="/root/QueryString/entityid" /></xsl:param>
<xsl:template match="/">
<tiltviewergallery>
<photos>
<photo imageurl="tiltviewer/examples/imgs/img.jpg" linkurl="">
<title>Image 1</title>
<description>This is a regular text description.</description>
</photo>
<photo imageurl="tiltviewer/examples/imgs/img.jpg" linkurl="">
<title>Image 2</title>
<description><![CDATA[This is a HTML text description. Supported tags are <b>bold</b>, <u>underline</u>, <i>italics</i>, linebreaks<br>and <font color="#ff0000" size="60">font tags</font>. Hyperlinks are not supported.]]></description>
</photo>
<photo imageurl="tiltviewer/examples/imgs/img.jpg" >
<title>Image 3</title>
<description>This image has no link button becasue the 'linkurl' property was removed from the photo tag</description>
</photo>
<photo imageurl="tiltviewer/examples/imgs/img.jpg" linkurl="" showFlipButton="false">
<title>Image 4</title>
<description>This image has no flip button because the 'showFlipButton' property was added to the photo tag</description>
</photo>
<photo imageurl="tiltviewer/examples/imgs/img.jpg" linkurl="">
<title>Image 5</title>
</photo>
<photo imageurl="tiltviewer/examples/imgs/img.jpg" linkurl="">
<title>Image 6</title>
</photo>
<photo imageurl="tiltviewer/examples/imgs/img.jpg" linkurl="">
<title>Image 7</title>
</photo>
<photo imageurl="tiltviewer/examples/imgs/img.jpg" linkurl="">
<title>Image 8</title>
</photo>
<photo imageurl="tiltviewer/examples/imgs/img.jpg" linkurl="">
<title>Image 9</title>
</photo>
<photo imageurl="tiltviewer/examples/imgs/img.jpg" linkurl="">
<title>Image 10</title>
</photo>
<photo imageurl="tiltviewer/examples/imgs/img.jpg" linkurl="">
<title>Image 11</title>
</photo>
<photo imageurl="tiltviewer/examples/imgs/img.jpg" linkurl="">
<title>Image 12</title>
</photo>
</photos>
</tiltviewergallery>
</xsl:template>
</xsl:stylesheet>
</PackageTransform>
</package>
We are going to be using the TiltViewer Flash object to display the actual (inner) galleries, so we're hooking this up now to get live image (product) data from gallerydata.xml.config XmlPackage (just like any entity package would) and spit out the resulting Xml. Job pretty much done then...excepting for some minor tweaks here and there.
again, the only tricks here are we are using url syntax of x- (which invokes the ExecXmlPackage http handler) vs e- (which invokes the engine page, rendered in skinbase) to provide the raw Xml data output, and setting the HTTPHeader element to Xml