c# - How to get a content node using Umbraco 5 API -


i'm umbraco newbie , trying speed. 1 of things i'm trying out api , accessing node in content tree. unfortunately documentation bit thin , can't find info covering such basic task...

i've got simple content structure

content > home > 

how retrieve node using c# , api plain old model class?

in other cms's simple calling database.getitem("/content/home/about")

how achieved umbraco v5?

thanks

if have single, specific piece of content want it, can select using hiveid so:

 umbraco.getcontentbyid("content://p__nhibernate/v__guid/0000000000000000") 

you can find content id examining content's properties backoffice.

edit:

if must content uri, querying hive. can't recommend performance though.

_context.application.hive.querycontent().where(x => x.niceurl().equals("/faq/functionality/submit-a-question",stringcomparison.invariantcultureignorecase); 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -