Display results based on a drop down list selection
Hi, I have an Umbraco V4 website and I have created a couple of Ultimate picker datatypes based on childs of the the following nodes (Locations and Categories):
Locations - Location A - Location B - Location C
Categories - Category A - Category B - Category C
The Locations Ultimate picker datatype is a dropdown list and the Catergories Ultimate picker datatype is a checkbox list where multiple selections can be selected. These two datatypes are included on a Document type called "Job". I have created a search based on Location and Categories that passes a query string to my search results page. I am having trouble displaying results when a Category is selected because I am not sure how I check whether the Category is selected in XSLT. So far I have the following XSLT, can anyone see what I am doing wrong?
<!-- GET CATEGORY QUERY STRING --> <xsl:variable name="categoryquery"> <xsl:choose> <xsl:when test="umbraco.library:Request('category') <= 0 or string(umbraco.library:Request('category')) = '' or string(umbraco.library:Request('category')) = 'NaN'">0</xsl:when> <xsl:otherwise> <xsl:value-of select="umbraco.library:Request('category')"/> </xsl:otherwise> </xsl:choose> </xsl:variable>
<!-- GET LOCATION QUERY STRING --> <xsl:variable name="locationquery"> <xsl:choose> <xsl:when test="umbraco.library:Request('location') <= 0 or string(umbraco.library:Request('location')) = '' or string(umbraco.library:Request('location')) = 'NaN'">0</xsl:when> <xsl:otherwise> <xsl:value-of select="umbraco.library:Request('location')"/> </xsl:otherwise> </xsl:choose> </xsl:variable>
<xsl:for-each select="umbraco.library:GetXmlNodeById(1148)/node [string(data [@alias='umbracoNaviHide']) != '1' and contains(data [@alias='category'], $categoryquery) and string(data [@alias='location']) = $locationquery]">
Display results based on a drop down list selection
Hi, I have an Umbraco V4 website and I have created a couple of Ultimate picker datatypes based on childs of the the following nodes (Locations and Categories):
Locations
- Location A
- Location B
- Location C
Categories
- Category A
- Category B
- Category C
The Locations Ultimate picker datatype is a dropdown list and the Catergories Ultimate picker datatype is a checkbox list where multiple selections can be selected. These two datatypes are included on a Document type called "Job". I have created a search based on Location and Categories that passes a query string to my search results page. I am having trouble displaying results when a Category is selected because I am not sure how I check whether the Category is selected in XSLT. So far I have the following XSLT, can anyone see what I am doing wrong?
Please ignore this, my code seems to work fine but it was not working because of a spelling mistake in my Job document type!!!
is working on a reply...