I have a preexisting site that uses the Ultimate Picker. (umbraco 4.6.1). I'd like it to automatically sort the list before displaying. It'd be nice to not have to create a new datatype, but to extend the current datatype. Is that possible?
You'd need to create a new custom datatype for this. To extend the existing Ultimate PIcker I believe you'd need to modify the Umbraco source (umbraco.editorControls).
However you could create one that is basically a copy of it, change the namespaces & GUID, and add a sorting option.
Another thought, you could use the Document Sorter package, which automatically sorts your nodes in the backoffice and keeps them sorted as new ones are created or edited. You can sort by any field using alpha/numeric/date options and specify which nodes to sort. The Ultimate Picker should then pick up on this sortorder.
I ended up going for the quicker solution and using the Document Sorter. It mostly worked as I use autofolders also. The folder that is created doesn't get sorted automatically, but the node gets sorted inside the folder correctly. I figure it would just be easier to create and sort the individual folders once and then it works everytime :-)
Hi every one i have ultimate picker name (selected bebefits and the alise name selectTheBenefits it hold the data) but in reply i did not get nothing. The code are below. I user the this link code (leekelleher.com/.../#comment-619)
System.Xml.XmlException: The 'xsl:stylesheet' start tag on line 3 position 2 does not match the end tag of 'xsl:output'. Line 37, position 15. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag) at System.Xml.XmlTextReaderImpl.ParseEndElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.Xsl.Xslt.XsltInput.ReadNextSibling() at System.Xml.Xsl.Xslt.XsltInput.MoveToNextSibling() at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List`1 content, InstructionFlags flags) at System.Xml.Xsl.Xslt.XsltLoader.LoadContent(Boolean hasSelect) at System.Xml.Xsl.Xslt.XsltLoader.XslVarPar() at System.Xml.Xsl.Xslt.XsltLoader.LoadGlobalVariableOrParameter(NsDecl stylesheetNsList, XslNodeType nodeType) at System.Xml.Xsl.Xslt.XsltLoader.LoadRealStylesheet() at System.Xml.Xsl.Xslt.XsltLoader.LoadDocument() at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include)
The above error show. then i modify after that no result come. Please help me. to seperate the value from ultimate picker check box list. Thank you.
would like to extend the ultimate picker
I have a preexisting site that uses the Ultimate Picker. (umbraco 4.6.1). I'd like it to automatically sort the list before displaying. It'd be nice to not have to create a new datatype, but to extend the current datatype. Is that possible?
-C
Hi Chad
When you say you want to able to sort the list before displaying are you then thinking in the umbraco backoffice or on the website?
/Jan
In the backoffice.
-C
Ok, thought so...then some of the C# guys is probably better of providing you an answer :-)
/Jan
Hi Chad,
You'd need to create a new custom datatype for this. To extend the existing Ultimate PIcker I believe you'd need to modify the Umbraco source (umbraco.editorControls).
However you could create one that is basically a copy of it, change the namespaces & GUID, and add a sorting option.
Another thought, you could use the Document Sorter package, which automatically sorts your nodes in the backoffice and keeps them sorted as new ones are created or edited. You can sort by any field using alpha/numeric/date options and specify which nodes to sort. The Ultimate Picker should then pick up on this sortorder.
Hope this helps,
Tom
Thanks.
I ended up going for the quicker solution and using the Document Sorter. It mostly worked as I use autofolders also. The folder that is created doesn't get sorted automatically, but the node gets sorted inside the folder correctly. I figure it would just be easier to create and sort the individual folders once and then it works everytime :-)
-C
Hi every one i have ultimate picker name (selected bebefits and the alise name selectTheBenefits it hold the data) but in reply i did not get nothing. The code are below. I user the this link code (leekelleher.com/.../#comment-619)
System.Xml.XmlException: The 'xsl:stylesheet' start tag on line 3 position 2 does not match the end tag of 'xsl:output'. Line 37, position 15.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Xsl.Xslt.XsltInput.ReadNextSibling()
at System.Xml.Xsl.Xslt.XsltInput.MoveToNextSibling()
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List`1 content, InstructionFlags flags)
at System.Xml.Xsl.Xslt.XsltLoader.LoadContent(Boolean hasSelect)
at System.Xml.Xsl.Xslt.XsltLoader.XslVarPar()
at System.Xml.Xsl.Xslt.XsltLoader.LoadGlobalVariableOrParameter(NsDecl stylesheetNsList, XslNodeType nodeType)
at System.Xml.Xsl.Xslt.XsltLoader.LoadRealStylesheet()
at System.Xml.Xsl.Xslt.XsltLoader.LoadDocument()
at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include)
The above error show. then i modify after that no result come. Please help me. to seperate the value from ultimate picker check box list. Thank you.
<?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:PS.XSLTsearch="urn:PS.XSLTsearch"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets PS.XSLTsearch ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<xsl:variable name="preNodes">
<xsl:variable name="relatedContent" select="$currentPage/*[@id=1098]/*[@alias='selectTheBenefits']" />
<xsl:variable name="nodeIds" select="umbraco.library:Split($relatedContent, ',')" />
<xsl:for-each select="$nodeIds/value">
<textarea>
<xsl:copy-of select="$relatedContent" />
</textarea>
<xsl:copy-of select="umbraco.library:GetXmlNodeById(.)"/>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="nodes" select="msxml:node-set($preNodes)/node" />
<xsl:if test="count($nodes) > 0">
<div class="related-content">
<h3>Related Content</h3>
<ul>
<xsl:for-each select="$nodes">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName">
</xsl:value-of></a></li>
</xsl:for-each></ul>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
is working on a reply...