I found a really good tutorial on Umbraco for beginners, at blogfodder.co.uk, but im having some issues with the Show in Footer feature. It has a master Docutype with a true/false option linked to a "show in footer" macro.
Im having some trouble with it not showing anything. Any help would be grateful.
For your info the XML schema changed in Umbraco 4.5 (about June 2010) so there's alot of 'legacy' xslt samples on the internet, this is why you had problems with the original script.
If you see '@nodeTypeAlias' anywhere in a code sample then this is old xslt.
Show In Footer
Hi all,
I found a really good tutorial on Umbraco for beginners, at blogfodder.co.uk, but im having some issues with the Show in Footer feature. It has a master Docutype with a true/false option linked to a "show in footer" macro.
Im having some trouble with it not showing anything. Any help would be grateful.
Thanks
Martin
The macro XSLT is
Hey,
This code is for a pre 4.5 version of Umbraco, what version of Umbraco are you using (at the time of writing the latest is 4.7)
If so, try changing this line
to
<xsl:for-each select="$currentPage/ancestor-or-self::node/descendant-or-self::node/* [@isDoc][string(ShowInFooter) = '1']">h
Sorry about the formatting, can't edit, try changing
To
Rich
Thanks Rich,
Im using the new version 4.7
Hey Martin,
Did you try the fix?
Rich
OK, false start. Im still having issues.
my xslt is :
<?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"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<ul>
<xsl:for-each select="$currentPage/ancestor-or-self::node/descendant-or-self::node/* [@isDoc][string(showInFooter) = '1']">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName" />
</a>
</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
Sorry, my bad, try this
Rich
Thanks Rich, Im new to XSLT, but its gonna take practice.
Thanks again.
No problem, did you get it working ok?
Rich
Yeah, its works great.
Thanks
No problem, glad to hear you got it working.
For your info the XML schema changed in Umbraco 4.5 (about June 2010) so there's alot of 'legacy' xslt samples on the internet, this is why you had problems with the original script.
If you see '@nodeTypeAlias' anywhere in a code sample then this is old xslt.
Cheers
Rich
is working on a reply...