Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi there,
How could I add an extension to the end of the urls with '#left-content' e.g. www.website.com/portfolio/all#left-content. When each of the links are selected it will fire the jquery to scroll to the portfolio area of the page.
This is the XSLT so far:
<?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:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:CWS.Twitter="urn:CWS.Twitter" xmlns:PS.XSLTsearch="urn:PS.XSLTsearch" exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets CWS.Twitter PS.XSLTsearch "><xsl:output method="xml" omit-xml-declaration="yes" /><xsl:param name="currentPage"/><!-- Input the documenttype you want here --><xsl:variable name="level" select="2"/><xsl:template match="/"><!-- The fun starts here --><ul class="portfolio-nav"> <li> <xsl:if test="$currentPage/@id = $currentPage/ancestor-or-self::* [@level=$level]/@id"> <xsl:attribute name="class">current</xsl:attribute> </xsl:if> <a href="http://umbraco.dddesigndev/portfolio.aspx" onclick="goToByScroll('left-content')">All</a></li><xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']"> <li> <xsl:if test="@id = $currentPage/@id"> <xsl:attribute name="class">current</xsl:attribute> </xsl:if> <a href="{umbraco.library:NiceUrl(@id)}" onclick="goToByScroll('left-content')"> <xsl:value-of select="@nodeName"/> </a> </li></xsl:for-each></ul></xsl:template></xsl:stylesheet>
Thanks,
Dan
Solved it, silly question thinking about it!
Just changed:
<a href="{umbraco.library:NiceUrl(@id)}" onclick="goToByScroll('left-content')">
to
<a href="{umbraco.library:NiceUrl(@id)}#left-content" onclick="goToByScroll('left-content')">
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Add a custom string after url name
Hi there,
How could I add an extension to the end of the urls with '#left-content' e.g. www.website.com/portfolio/all#left-content. When each of the links are selected it will fire the jquery to scroll to the portfolio area of the page.
This is the XSLT so far:
<?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:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:CWS.Twitter="urn:CWS.Twitter" xmlns:PS.XSLTsearch="urn:PS.XSLTsearch"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets CWS.Twitter PS.XSLTsearch ">
<xsl:output method="xml" omit-xml-declaration="yes" />
<xsl:param name="currentPage"/>
<!-- Input the documenttype you want here -->
<xsl:variable name="level" select="2"/>
<xsl:template match="/">
<!-- The fun starts here -->
<ul class="portfolio-nav">
<li>
<xsl:if test="$currentPage/@id = $currentPage/ancestor-or-self::* [@level=$level]/@id">
<xsl:attribute name="class">current</xsl:attribute>
</xsl:if>
<a href="http://umbraco.dddesigndev/portfolio.aspx" onclick="goToByScroll('left-content')">All</a></li>
<xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
<li>
<xsl:if test="@id = $currentPage/@id">
<xsl:attribute name="class">current</xsl:attribute>
</xsl:if>
<a href="{umbraco.library:NiceUrl(@id)}" onclick="goToByScroll('left-content')">
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
Thanks,
Dan
Solved it, silly question thinking about it!
Just changed:
<a href="{umbraco.library:NiceUrl(@id)}" onclick="goToByScroll('left-content')">
to
<a href="{umbraco.library:NiceUrl(@id)}#left-content" onclick="goToByScroll('left-content')">
is working on a reply...