Copied to clipboard

Flag this post as spam?

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


  • Pete 152 posts 176 karma points
    Oct 07, 2009 @ 10:19
    Pete
    0

    Can we make Ultimate Picker show published items only?

    I can't see a way to do this in the CMS - can it be done? 

  • Ron Brouwer 273 posts 768 karma points
    Oct 07, 2009 @ 10:29
    Ron Brouwer
    0

    Only by changing the sourcecode as far as i can tell.

    Another solution that I use for that problem is (It habbens with more datatypes):

    public static bool NodeExistsAndIsPublished(int nodeId)
            {
                try
                {
                    XPathNavigator navigator = content.Instance.XmlContent.CreateNavigator();
                    string Expression = "//node[@id='" + nodeId + "']";
                    Int32.Parse(navigator.SelectSingleNode(navigator.Compile(Expression)).GetAttribute("id", String.Empty));
                }
                catch (Exception ex)
                {
                    return false;
                }

                return true;
            }

    You can add that function as an xsltextension.

    Ron

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies