Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I try to use something like this
@Model.Where("cities.Contains(\"Zlín\")")
but it don't work.
Property city is defined as XPathCheckBoxList from uComponents.
Is there any workaround or miss I something?
Thanks
Did you find a fix for this? I'm having same issue
I ended with something like this:
Func cityDiscountsFilter = delegate(DynamicBackingItem node) { var cities = node.GetPropertyValue("cities"); return cities.Contains(CurrentCity); }; var root = @Model.AncestorOrSelf(); var cityDiscounts = root.Descendants(cityDiscountsFilter);
Maybe it's fixed in new version of uComponents
http://ucomponents.codeplex.com/SourceControl/changeset/26d67e1a7921
Or maybe it can be solved by using http://razordatatypemodels.codeplex.com/
I am experiencing the same issue trying to filter nodes based matching values in a XPathCheckBoxList (Umbraco 6.1.5)
var nodes = Model.AncestorOrSelf().Descendants().Where("articleExpertiseTags == 1068);
<articleExpertiseTags>
<XPathCheckBoxList>
<nodeId>1068</nodeId>
<nodeId>1070</nodeId>
</XPathCheckBoxList>
</articleExpertiseTags>
Hi Andy,
Have you tried using uQuery GetNodesByXml? It is part of uComponents and designed as a helper for those legacy xpath data types.
Hope that helps,Matt
Thanks I will have a look. Can you suggest a more appropriate data type to use instead?
is working on a reply...
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.
Continue discussion
Where and XPathCheckBoxList
Hi,
I try to use something like this
@Model.Where("cities.Contains(\"Zlín\")")
but it don't work.
Property city is defined as XPathCheckBoxList from uComponents.
Is there any workaround or miss I something?
Thanks
Did you find a fix for this? I'm having same issue
I ended with something like this:
Maybe it's fixed in new version of uComponents
http://ucomponents.codeplex.com/SourceControl/changeset/26d67e1a7921
Or maybe it can be solved by using http://razordatatypemodels.codeplex.com/
I am experiencing the same issue trying to filter nodes based matching values in a XPathCheckBoxList (Umbraco 6.1.5)
var nodes = Model.AncestorOrSelf().Descendants().Where("articleExpertiseTags == 1068);
<articleExpertiseTags>
<XPathCheckBoxList>
<nodeId>1068</nodeId>
<nodeId>1070</nodeId>
</XPathCheckBoxList>
</articleExpertiseTags>
Hi Andy,
Have you tried using uQuery GetNodesByXml? It is part of uComponents and designed as a helper for those legacy xpath data types.
Hope that helps,
Matt
Thanks I will have a look. Can you suggest a more appropriate data type to use instead?
is working on a reply...
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.