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.
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.
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.
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).
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.
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).
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.
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...
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?
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
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.
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
Craig, did you figure this out? I am in the same situation. I don't want someone picking items that are not published.
Hi Connie,
The uComponents XPath CheckBoxList will only show published items.
HTH,
Hendy
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.
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).
You can use something like this, depending on where your Banner Ads node is located
or
etc..
-Tom
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.
Ok, got part b, that was easy. Below is what i have so far.
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...
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.
Hi Connie
What does the error say?
/Jan
Just says that. When you save, to the right of the filter it says: Syntax error in XPath expression
is working on a reply...