hi,
I am experimenting with the umbracoTagging package created by Per Ploug Hansen
more info on his blog (http://objects.dk/2007/11/2/umbraco-tagging-package.aspx)
though installation was successful, following his screencasts i could create the datatype without any trouble, adding tags to certain documentTypes also went like a breeze...
now, when creating a macro / xslt to list all Categories (tags) with their count()
i keep getting an error (see QUOTE block below)
i also added the code i use (see CODE block below)
i am relatively new to umbraco, i mean to the development side then...
i used umbraco alot for templates and content.... before but this is 1 of the first times i come in contact with the dev side. So my knowledge of xslt is not that high. i added the reference in top of the xslt file yet still he can't find the umbracoTags object / functions...
anyone an idea how this can be solved?
error wrote:
Error occured
System.Xml.Xsl.XsltException: 'umbracoTags.library.getAllTagsInGroup()' is an unknown XSLT function.
at System.Xml.Xsl.XsltOld.XsltCompileContext.ResolveFunction(String prefix, String name, XPathResultType[] argTypes)
at MS.Internal.Xml.XPath.FunctionQuery.SetXsltContext(XsltContext context)
at System.Xml.Xsl.XsltOld.Processor.GetCompiledQuery(Int32 key)
at System.Xml.Xsl.XsltOld.Processor.StartQuery(XPathNodeIterator context, Int32 key)
at System.Xml.Xsl.XsltOld.ForEachAction.Execute(Processor processor, ActionFrame frame)
at System.Xml.Xsl.XsltOld.ActionFrame.Execute(Processor processor)
at System.Xml.Xsl.XsltOld.Processor.Execute()
at System.Xml.Xsl.XslTransform.Transform(XPathNavigator input, XsltArgumentList args, TextWriter output, XmlResolver resolver)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String fileContents, Boolean ignoreDebugging)
the code i use currently is: (basicly ALL the same as the screencast...)
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:umbracoTags.library="urn:umbracoTags.library"
exclude-result-prefixes="msxml umbraco.library umbracoTags.library">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<ul>
<xsl:for-each select="umbracoTags.library.getAllTagsInGroup('sandbox')/tags/tag">
<li>
<a href="/?filterby={current()}">
<xsl:value-of select="current()"/></a> (<xsl:value-of select="@nodesTagged"/>)
</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
Sander Houttekier, Umbraco Level 2 Certified