Copied to clipboard

Flag this post as spam?

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


  • Craig Palenshus 39 posts 63 karma points
    Jan 28, 2011 @ 21:31
    Craig Palenshus
    0

    Checkbox list datatype shows all nodes rather than just published nodes

    How do I control which type of nodes display in a checkbox list data type?

    I'm using the Ultimate Picker with datatype of CheckBoxList and have set the parent node and alias filter. All the items that match that criteria display, but I only want published items to display.

    Can this be done?

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

    Hi Craig

    I don't think it can be done using the ultimate picker. I just had a look at it thinking it should be possible to achieve by defining some XPATH fetching the nodes you want to see. But I must have got this option confused with one of the other picker packages available.

    I think you should maybe have a look at the XPath CheckBoxList, which is a part of the uComponents package. Maybe this is waht you're after?

    There is also the Axendo Ultimate picker xpath, which basically is extending the ultimate picker with the ability to choose specific nodes using an XPATH expression.

    I hope this helps.

    /Jan

  • Craig Palenshus 39 posts 63 karma points
    Mar 16, 2011 @ 16:05
    Craig Palenshus
    0

    Thank you, Jan. I haven't had a chance to try this yet, but if the client pushes back that they really need this functionality, I'll give one of those to solutions a try and update this post. Thanks again.

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Mar 16, 2011 @ 16:33
    Hendy Racher
    0

    Hi,

    Just to clarify, the uComponents XPath CheckBoxList uses an XPath expression to select the nodes to be used as checkbox options, and so only works with published nodes (these nodes can be anywhere within the tree, and can be selected by their property values etc...)

    The Axendeo Ultimate Picker XPath uses XPath to select the parent node such that all it's children, or all it's decendant nodes (published or unpublished) can be used as autocomplete / checkbox / drop down / listbox / radiobutton options (just like ultimatepicker).

    HTH,

    Hendy

  • Connie DeCinko 931 posts 1160 karma points
    Apr 07, 2011 @ 01:01
    Connie DeCinko
    0

    Craig, did you figure this out? I am in the same situation.  I don't want someone picking items that are not published.

     

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Apr 07, 2011 @ 08:05
    Hendy Racher
    0

    Hi Connie,

    The uComponents XPath CheckBoxList will only show published items.

    HTH,

    Hendy

  • Craig Palenshus 39 posts 63 karma points
    Apr 07, 2011 @ 14:18
    Craig Palenshus
    0

    Thanks for jumping in to respond, Hendy. I haven't had the chance to give that a try yet, and the client looks like they're going to stiff us for the work we did, so it isn't likely I'll be attempting it for this project any time soon.

  • Connie DeCinko 931 posts 1160 karma points
    May 17, 2011 @ 23:34
    Connie DeCinko
    0

    I'm trying to use the uComponents XPath CheckBoxList as a datatype, but I can't figure out what to set in the XPath expression.  So far, I keep getting a syntax error when trying to save.  I want to show nodes under a certain parent node (i.e. banner ads under a banner ad folder).

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    May 18, 2011 @ 04:25
    Tom Fulton
    0

    You can use something like this, depending on where your Banner Ads node is located

    $parentPage/ancestor::* [@level = 1]/BannerAdFolder

    or

    $parentPage/ancestor::Homepage/Config/BannerAdFolder

    etc..

    -Tom

  • Connie DeCinko 931 posts 1160 karma points
    May 18, 2011 @ 19:25
    Connie DeCinko
    0

    Ok, had to reinstall uComponents 2.1 as apparently my beta copy was not complete.  Now, I get my datatype.  I get an unfiltered list, so far so good.  Now the fun part. 

    a.  I only want to show nodes published/created within the past 7 days.

    b.  I only want to show nodes where the image property is not empty.

     

  • Connie DeCinko 931 posts 1160 karma points
    May 18, 2011 @ 19:37
    Connie DeCinko
    0

    Ok, got part b, that was easy.  Below is what i have so far.

    $currentPage//* [@isDoc and name()='LegalNewsHeadline' and photo !='']
  • Tom Fulton 2030 posts 4998 karma points c-trib
    May 18, 2011 @ 22:51
    Tom Fulton
    0

    I'm not sure you'll be able to do a), because you probably need to use an extension method like umbraco.library:DateGreaterThanOrEqualToToday but I don't think you can use them in this area...

  • Connie DeCinko 931 posts 1160 karma points
    May 19, 2011 @ 17:30
    Connie DeCinko
    0

    Tried the umraco.library but I get a syntax error.

    I know this can be done as I have seen similar attempts in other apps. Just not sure how to make it work here.

     

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

    Hi Connie

    What does the error say?

    /Jan

  • Connie DeCinko 931 posts 1160 karma points
    May 20, 2011 @ 00:20
    Connie DeCinko
    0

    Just says that.  When you save, to the right of the filter it says:  Syntax error in XPath expression

     

Please Sign in or register to post replies

Write your reply to:

Draft