I had been working on creating a banner that would change based on user input, category selection and so on. I found this on the forum from Rizzy. It works great, but i cant seem to make it work with flash. I would really like to have flash in the banner instead of images. Has anyone gotten a flash banner to change based on category or other user input?
<?xml version="1.0" standalone="yes" ?>
<package version="2.1" displayname="SubHeader" debug="false" includeentityhelper="true">
<query name="Categories" rowElementName="Category">
<sql>
<![CDATA[
SELECT * FROM Category WHERE CategoryID = @CategoryID
]]>
</sql>
<queryparam paramname="@CategoryID"
paramtype="request"
requestparamname="categoryid"
sqlDataType="int"
defvalue="0"
validationpattern="" />
</query>
<query name="Products" rowElementName="Product">
<sql>
<![CDATA[
SELECT TOP 1* FROM ProductCategory WHERE ProductID = @ProductID
]]>
</sql>
<queryparam paramname="@ProductID"
paramtype="request"
requestparamname="productid"
sqlDataType="int"
defvalue="0"
validationpattern="" />
</query>
<query name="Sections" rowElementName="Section">
<sql>
<![CDATA[
SELECT * FROM Section WHERE SectionID = @SectionID
]]>
</sql>
<queryparam paramname="@SectionID"
paramtype="request"
requestparamname="sectionid"
sqlDataType="int"
defvalue="0"
validationpattern="" />
</query>
<PackageTransform>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
<xslutput method="html" omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:choose>
<xsl:when test="/root/Products/Product !=0 or /root/Categories/Category !=0 or /root/Sections/Section !=0 ">
<xsl:apply-templates select="/root/Products/Product" />
<xsl:apply-templates select="/root/Categories/Category" />
<xsl:apply-templates select="/root/Sections/Section" />
</xsl:when>
<xsltherwise>
<img src='./skins/Skin_1/images/subheader/0.gif'></img>
</xsltherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="Product">
<xsl:choose>
<xsl:when test="aspdnsf:FileExists(concat('./skins/Skin_1/images/subheader/',CategoryID,'.gif')) = 'true'">
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="concat('./skins/Skin_1/images/subheader/',CategoryID,'.gif')"/>
</xsl:attribute>
</xsl:element>
</xsl:when>
<xsltherwise>
<img src='./skins/Skin_1/images/subheader/0.gif'></img>
</xsltherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="Category">
<xsl:choose>
<xsl:when test="aspdnsf:FileExists(concat('./skins/Skin_1/images/subheader/',CategoryID,'.gif')) = 'true'">
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="concat('./skins/Skin_1/images/subheader/',CategoryID,'.gif')"/>
</xsl:attribute>
</xsl:element>
</xsl:when>
<xsltherwise>
<img src='./skins/Skin_1/images/subheader/0.gif'></img>
</xsltherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="Section">
<xsl:choose>
<xsl:when test="aspdnsf:FileExists(concat('./skins/Skin_1/images/subheader-department/',SectionID,'.gif')) = 'true'">
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="concat('./skins/Skin_1/images/subheader-department/',SectionID,'.gif')"/>
</xsl:attribute>
</xsl:element>
</xsl:when>
<xsltherwise>
<img src='./skins/Skin_1/images/subheader/0.gif'></img>
</xsltherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
</PackageTransform>
</package>