Querying on Umbraco Checkboxlist items using Razor -


i have following on page:

var filteredarticles = newsnode.descendants().where("newstype.split(',').contains('employer')"); 

newstype property on news items umbraco checkbox list data type umbraco renders comma delimited list such :

<newstype>agent,employer,provider,home page</newstype> 

i want retrieve "employer" articles. receive following error:

umbraco.core.dynamics.parseexception: no applicable method 'split' exists in type 'string'

is there different way query comma delimited list checkbox list using razor?

this umbraco version 7.2.4.

first of version of umbraco - 4, 6 or 7?

secondly have list of articles, want query.

newsnode.descendants()  

presumably there property on news article wish filter - in other words, what, in news article, contain text "employer" can filter?

might easier if upload code can have look.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -