Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chad Rosenthal 272 posts 474 karma points
    Apr 19, 2011 @ 22:17
    Chad Rosenthal
    0

    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

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 19, 2011 @ 22:19
    Jan Skovgaard
    0

    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

  • Chad Rosenthal 272 posts 474 karma points
    Apr 19, 2011 @ 22:21
    Chad Rosenthal
    0

    In the backoffice.

    -C

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 19, 2011 @ 22:24
    Jan Skovgaard
    0

    Ok, thought so...then some of the C# guys is probably better of providing you an answer :-)

    /Jan

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Apr 20, 2011 @ 14:51
    Tom Fulton
    1

    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

  • Chad Rosenthal 272 posts 474 karma points
    Apr 20, 2011 @ 15:12
    Chad Rosenthal
    0

    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

     

  • Md Johirul Islam 37 posts 57 karma points
    Sep 26, 2012 @ 17:53
    Md Johirul Islam
    0

    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 "&#x00A0;"> ]>
    <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>
                                <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>

Please Sign in or register to post replies

Write your reply to:

Draft