<!-- do this --> <li><a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a></li> </xsl:if> </xsl:for-each> </ul> </xsl:template>
</xsl:stylesheet>
So I am just a touch stuck.. really am scratching my head . This will produce a nice list but the NiceUrl part just returns a blank . I have checked @id it returns the id as you would expect .. I have to say I am stuck. I assume my umbraco build is corrupted or something.
I am so hoping someone can view above and just say.. Nope you are being dumb it is xx . ;)
I am using <UseLegacyXmlSchema>true</UseLegacyXmlSchema> in the umbraco config file.
Thanks so much for reply.. well I am pretty sure it is now a site issue. /cry basically you prompted me to try to re-publish the site. It has duplicated all of the nodes .. and I tried again re-publish I now have 3 times as many nodes. Methinks .. I might have a problem. The site has 800 pages so and I have just upgraded it locally on my laptop to test it.. At the moment though it looks like 4.5.1 is not going to love me or this site. I will have to look at why the umbraco manager has only one copy of the page but the publish page looks to be able to find 3 times as many pages and no url. Either way this upgrade is a bit of drama to say the least .. Thankfully not in a live environment.
If I found my issue I will post it as I doubt I will be the last person with this problem.
4.5.1 And NiceUrl
<?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="/">
<!-- start writing XSLT -->
<ul>
<xsl:for-each select="$currentPage/*">
<xsl:if test="string(@id) != '' ">
<!-- do this -->
<li><a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a></li>
</xsl:if>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
So I am just a touch stuck.. really am scratching my head . This will produce a nice list but the NiceUrl part just returns a blank . I have checked @id it returns the id as you would expect .. I have to say I am stuck. I assume my umbraco build is corrupted or something.
I am so hoping someone can view above and just say.. Nope you are being dumb it is xx . ;)
I am using <UseLegacyXmlSchema>true</UseLegacyXmlSchema> in the umbraco config file.
umbraco v 4.5.1 (Assembly version: 1.0.3858.40498
Any help would be great.
Many thanks,
Cheers,
James
Hi James,
maybe it's worth checking the /App_Data/umbraco.config file if the legacy Xml Schema is generated alright.
Otherwise the above looks okay to me, you could maybe try the following although I don't expect anything fancy coming from it:
Sascha
Hi Sascha,
Thanks so much for reply.. well I am pretty sure it is now a site issue. /cry basically you prompted me to try to re-publish the site. It has duplicated all of the nodes .. and I tried again re-publish I now have 3 times as many nodes. Methinks .. I might have a problem. The site has 800 pages so and I have just upgraded it locally on my laptop to test it.. At the moment though it looks like 4.5.1 is not going to love me or this site. I will have to look at why the umbraco manager has only one copy of the page but the publish page looks to be able to find 3 times as many pages and no url. Either way this upgrade is a bit of drama to say the least .. Thankfully not in a live environment.
If I found my issue I will post it as I doubt I will be the last person with this problem.
James
is working on a reply...