umbraco6 - Use Content instead of Document in Umbraco (v6) -


i update obsolete code umbraco v4 in updated v6 solution.

i have

entitiesfolder = new umbraco.cms.businesslogic.web.document(folderid); entitiesfolder.reorderchildren(     entitiesfolder.children.orderby(fdoc => fdoc.text),      refreshentirecache); 

now recomendation instead of obsolete document use umbraco.core.models.content. how? didn't find (as usual umbraco) documentation about... (

// new version var toto = new umbraco.core.models.content(??) toto.soirtchildren(???) 

are doing razor view? if can do:

var nodeid = 123; var mynode = umbraco.typedcontent(nodeid); var property = mynode.getpropertyvalue<string>("mystringalias"); 

if you're doing class or you'll have use like:

var helper = new umbracohelper(umbracocontext.current); var nodeid = 123; var mynode = helper.typedcontent(nodeid); 

(this untested should work..)


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -