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
Post a Comment