Need some help with 1 portfolio for different types of work...
Here is what I am trying to do...
I have set up a portfolio and everything works great, now I have set up a propery "type" that is a dropdown multiple with the prevalues "website", "video", "animation". Now I want to set up the page to show the website portfolio projects as default and then have tabs for video and animation. I would like to set it up where when you click video it will just refresh the page (portfolio.aspx?animation) and show the projects the the type="animation". How can I set this up? Currently I have this which just shows everything.
Need some help with 1 portfolio for different types of work...
Here is what I am trying to do...
I have set up a portfolio and everything works great, now I have set up a propery "type" that is a dropdown multiple with the prevalues "website", "video", "animation". Now I want to set up the page to show the website portfolio projects as default and then have tabs for video and animation. I would like to set it up where when you click video it will just refresh the page (portfolio.aspx?animation) and show the projects the the type="animation". How can I set this up? Currently I have this which just shows everything.
[code]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
xmlns:tagsLib="urn:tagsLib"
exclude-result-prefixes="msxml umbraco.library tagsLib">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<xsl:variable name="recordsPerPage" select="5" />
<xsl:variable name="pageNumber" >
<xsl:choose>
<xsl:when test="umbraco.library:RequestQueryString('page') <=0 or string(umbraco.library:RequestQueryString('page')) = '' or string(umbraco.library:RequestQueryString('page')) = 'NaN'">0</xsl:when>
<xsl:otherwise>
<xsl:value-of select="umbraco.library:RequestQueryString('page')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="numberOfRecords" select="count($currentPage/node)"/>
<xsl:for-each select="$currentPage/node [string(data [@alias='umbracoNaviHide']) != '1']">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">
<xsl:if test="position() > $recordsPerPage * number($pageNumber) and position() <= number($recordsPerPage * number($pageNumber) + $recordsPerPage )">
<div class="PortfolioItemEven">
<div class="PortfolioImg">
<xsl:if test="./data [@alias='siteImgBig'] != ''">
<a href="{./data [@alias='siteImgBig']}">
<img src="{./data [@alias='projectImg']}" alt="{@nodeName}" class="portImg"/>
</a>
</xsl:if>
<xsl:if test="./data [@alias='siteImgBig'] = ''">
<img src="/images/inProgress.jpg" alt="{@nodeName} is Still In Progress" class="portImg" />
</xsl:if>
</div>
<div class="PortfolioInfo">
<xsl:if test="string(./data [@alias='visitSite']) = '0'">
<span class="portInfoSpan">Deadline</span>
</xsl:if>
<xsl:if test="string(./data [@alias='visitSite']) = '1'">
<span class="portInfoSpan">Date: </span>
</xsl:if>
<xsl:value-of select="./data [@alias='date']" />
<br />
<br />
<span class="portInfoSpan">Client: </span>
<xsl:value-of select="./data [@alias='clientName']" />
<br />
<br />
<span class="portInfoSpan">Project: </span>
<xsl:value-of select="./data [@alias='projDescription']" />
<br />
<br />
<xsl:if test="string(./data [@alias='visitSite']) = '1'">
<a href="{./data [@alias='siteLink']}" title="{@nodeName}" target="_blank">
<strong>Visit Site</strong>
</a>
</xsl:if>
<xsl:if test="string(./data [@alias='visitSite']) = '0'">
<strong>Still in Progress</strong>
</xsl:if>
</div>
</div>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="position() > $recordsPerPage * number($pageNumber) and position() <= number($recordsPerPage * number($pageNumber) + $recordsPerPage )">
<div class="PortfolioItemOdd">
<div class="PortfolioImg">
<xsl:if test="./data [@alias='siteImgBig'] != ''">
<a href="{./data [@alias='siteImgBig']}">
<img src="{./data [@alias='projectImg']}" alt="{@nodeName}" class="portImg"/>
</a>
</xsl:if>
<xsl:if test="./data [@alias='siteImgBig'] = ''">
<img src="/images/inProgress.jpg" alt="{@nodeName} is Still In Progress" class="portImg" />
</xsl:if>
</div>
<div class="PortfolioInfo">
<xsl:if test="string(./data [@alias='visitSite']) = '0'">
<span class="portInfoSpan">Deadline: </span>
</xsl:if>
<xsl:if test="string(./data [@alias='visitSite']) = '1'">
<span class="portInfoSpan">Date: </span>
</xsl:if>
<xsl:value-of select="./data [@alias='date']" />
<br />
<br />
<span class="portInfoSpan">Client: </span>
<xsl:value-of select="./data [@alias='clientName']" />
<br />
<br />
<span class="portInfoSpan">Project: </span>
<xsl:value-of select="./data [@alias='projDescription']" />
<br />
<br />
<xsl:if test="string(./data [@alias='visitSite']) = '1'">
<a href="{./data [@alias='siteLink']}" title="{@nodeName}" target="_blank">
<strong>Visit Site</strong>
</a>
</xsl:if>
<xsl:if test="string(./data [@alias='visitSite']) = '0'">
<strong>Still in Progress</strong>
</xsl:if>
</div>
</div>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<div align="center">
<div id="pagination">
<br />
<xsl:if test="$pageNumber > 0">
<a href="?page{$pageNumber -1}">
<img src="/images/fancy_left.png" alt="previous page" border="0" />
</a>
</xsl:if>
<xsl:if test="(($pageNumber +1 ) * $recordsPerPage) < ($numberOfRecords)">
<a href="?page={$pageNumber +1}">
<img src="/images/fancy_right.png" alt="next page" border="0" />
</a>
</xsl:if>
</div>
</div>
</xsl:template>
</xsl:stylesheet>
[/code]
Solved it myself, if anyone is interested here is the code...
[code]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
xmlns:tagsLib="urn:tagsLib"
exclude-result-prefixes="msxml umbraco.library tagsLib">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<xsl:variable name="recordsPerPage" select="5" />
<xsl:variable name="pageNumber" >
<xsl:choose>
<xsl:when test="umbraco.library:RequestQueryString('page') <=0 or string(umbraco.library:RequestQueryString('page')) = '' or string(umbraco.library:RequestQueryString('page')) = 'NaN'">0</xsl:when>
<xsl:otherwise>
<xsl:value-of select="umbraco.library:RequestQueryString('page')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="projectType" >
<xsl:choose>
<xsl:when test="string(umbraco.library:RequestQueryString('projectType')) = '' or string(umbraco.library:RequestQueryString('projectType')) = 'Website'">Website</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="string(umbraco.library:RequestQueryString('projectType')) = 'Video'">Video</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="string(umbraco.library:RequestQueryString('projectType')) = 'Animation'">Animation</xsl:when>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="numberOfRecords" select="count($currentPage/node)"/>
<a href="?projectType=Website">Website</a> | <a href="?projectType=Video">Video</a> | <a href="?projectType=Animation">Animation</a>
<xsl:if test="$projectType = 'Website'">
<xsl:for-each select="$currentPage/node [string(data [@alias='type']) = 'Website']">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">
<xsl:if test="position() > $recordsPerPage * number($pageNumber) and position() <= number($recordsPerPage * number($pageNumber) + $recordsPerPage )">
<div class="PortfolioItemEven">
<div class="PortfolioImg">
<xsl:if test="./data [@alias='siteImgBig'] != ''">
<a href="{./data [@alias='siteImgBig']}">
<img src="{./data [@alias='projectImg']}" alt="{@nodeName}" class="portImg"/>
</a>
</xsl:if>
<xsl:if test="./data [@alias='siteImgBig'] = ''">
<img src="/images/inProgress.jpg" alt="{@nodeName} is Still In Progress" class="portImg" />
</xsl:if>
</div>
<div class="PortfolioInfo">
<xsl:if test="string(./data [@alias='visitSite']) = '0'">
<span class="portInfoSpan">Deadline</span>
</xsl:if>
<xsl:if test="string(./data [@alias='visitSite']) = '1'">
<span class="portInfoSpan">Date: </span>
</xsl:if>
<xsl:value-of select="./data [@alias='date']" />
<br />
<br />
<span class="portInfoSpan">Client: </span>
<xsl:value-of select="./data [@alias='clientName']" />
<br />
<br />
<span class="portInfoSpan">Project: </span>
<xsl:value-of select="./data [@alias='projDescription']" />
<br />
<br />
<xsl:if test="string(./data [@alias='visitSite']) = '1'">
<a href="{./data [@alias='siteLink']}" title="{@nodeName}" target="_blank">
<strong>Visit Site</strong>
</a>
</xsl:if>
<xsl:if test="string(./data [@alias='visitSite']) = '0'">
<strong>Still in Progress</strong>
</xsl:if>
</div>
</div>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="position() > $recordsPerPage * number($pageNumber) and position() <= number($recordsPerPage * number($pageNumber) + $recordsPerPage )">
<div class="PortfolioItemOdd">
<div class="PortfolioImg">
<xsl:if test="./data [@alias='siteImgBig'] != ''">
<a href="{./data [@alias='siteImgBig']}">
<img src="{./data [@alias='projectImg']}" alt="{@nodeName}" class="portImg"/>
</a>
</xsl:if>
<xsl:if test="./data [@alias='siteImgBig'] = ''">
<img src="/images/inProgress.jpg" alt="{@nodeName} is Still In Progress" class="portImg" />
</xsl:if>
</div>
<div class="PortfolioInfo">
<xsl:if test="string(./data [@alias='visitSite']) = '0'">
<span class="portInfoSpan">Deadline: </span>
</xsl:if>
<xsl:if test="string(./data [@alias='visitSite']) = '1'">
<span class="portInfoSpan">Date: </span>
</xsl:if>
<xsl:value-of select="./data [@alias='date']" />
<br />
<br />
<span class="portInfoSpan">Client: </span>
<xsl:value-of select="./data [@alias='clientName']" />
<br />
<br />
<span class="portInfoSpan">Project: </span>
<xsl:value-of select="./data [@alias='projDescription']" />
<br />
<br />
<xsl:if test="string(./data [@alias='visitSite']) = '1'">
<a href="{./data [@alias='siteLink']}" title="{@nodeName}" target="_blank">
<strong>Visit Site</strong>
</a>
</xsl:if>
<xsl:if test="string(./data [@alias='visitSite']) = '0'">
<strong>Still in Progress</strong>
</xsl:if>
</div>
</div>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:if>
<xsl:if test="$projectType = 'Video'">
<xsl:for-each select="$currentPage/node [string(data [@alias='type']) = 'Video']">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">
<xsl:if test="position() > $recordsPerPage * number($pageNumber) and position() <= number($recordsPerPage * number($pageNumber) + $recordsPerPage )">
<div class="PortfolioItemEven">
<div class="PortfolioImg">
<xsl:if test="./data [@alias='siteImgBig'] != ''">
<a href="{./data [@alias='siteImgBig']}">
<img src="{./data [@alias='projectImg']}" alt="{@nodeName}" class="portImg"/>
</a>
</xsl:if>
<xsl:if test="./data [@alias='siteImgBig'] = ''">
<img src="/images/inProgress.jpg" alt="{@nodeName} is Still In Progress" class="portImg" />
</xsl:if>
</div>
<div class="PortfolioInfo">
<xsl:if test="string(./data [@alias='visitSite']) = '0'">
<span class="portInfoSpan">Deadline</span>
</xsl:if>
<xsl:if test="string(./data [@alias='visitSite']) = '1'">
<span class="portInfoSpan">Date: </span>
</xsl:if>
<xsl:value-of select="./data [@alias='date']" />
<br />
<br />
<span class="portInfoSpan">Client: </span>
<xsl:value-of select="./data [@alias='clientName']" />
<br />
<br />
<span class="portInfoSpan">Project: </span>
<xsl:value-of select="./data [@alias='projDescription']" />
<br />
<br />
<xsl:if test="string(./data [@alias='visitSite']) = '1'">
<a href="{./data [@alias='siteLink']}" title="{@nodeName}" target="_blank">
<strong>Visit Site</strong>
</a>
</xsl:if>
<xsl:if test="string(./data [@alias='visitSite']) = '0'">
<strong>Still in Progress</strong>
</xsl:if>
</div>
</div>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="position() > $recordsPerPage * number($pageNumber) and position() <= number($recordsPerPage * number($pageNumber) + $recordsPerPage )">
<div class="PortfolioItemOdd">
<div class="PortfolioImg">
<xsl:if test="./data [@alias='siteImgBig'] != ''">
<a href="{./data [@alias='siteImgBig']}">
<img src="{./data [@alias='projectImg']}" alt="{@nodeName}" class="portImg"/>
</a>
</xsl:if>
<xsl:if test="./data [@alias='siteImgBig'] = ''">
<img src="/images/inProgress.jpg" alt="{@nodeName} is Still In Progress" class="portImg" />
</xsl:if>
</div>
<div class="PortfolioInfo">
<xsl:if test="string(./data [@alias='visitSite']) = '0'">
<span class="portInfoSpan">Deadline: </span>
</xsl:if>
<xsl:if test="string(./data [@alias='visitSite']) = '1'">
<span class="portInfoSpan">Date: </span>
</xsl:if>
<xsl:value-of select="./data [@alias='date']" />
<br />
<br />
<span class="portInfoSpan">Client: </span>
<xsl:value-of select="./data [@alias='clientName']" />
<br />
<br />
<span class="portInfoSpan">Project: </span>
<xsl:value-of select="./data [@alias='projDescription']" />
<br />
<br />
<xsl:if test="string(./data [@alias='visitSite']) = '1'">
<a href="{./data [@alias='siteLink']}" title="{@nodeName}" target="_blank">
<strong>Visit Site</strong>
</a>
</xsl:if>
<xsl:if test="string(./data [@alias='visitSite']) = '0'">
<strong>Still in Progress</strong>
</xsl:if>
</div>
</div>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:if>
<div align="center">
<div id="pagination">
<br />
<xsl:if test="$pageNumber > 0">
<a href="?page{$pageNumber -1}">
<img src="/images/fancy_left.png" alt="previous page" border="0" />
</a>
</xsl:if>
<xsl:if test="(($pageNumber +1 ) * $recordsPerPage) < ($numberOfRecords)">
<a href="?page={$pageNumber +1}">
<img src="/images/fancy_right.png" alt="next page" border="0" />
</a>
</xsl:if>
</div>
</div>
</xsl:template>
</xsl:stylesheet>
[/code]
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.