How to read Custom Property value and term description from NavigationTerm in sharepoint 2013? -


in publishing sharepoint 2013 site, using managed navigation. need read value of custom property defined in term store , need read value of description field. possible read access site?

i can obtain taxonomynavigationcontext.current.navigationterm , read basic info. read custom property , description, need taxonomy term , cannot use read-only cached navigation term.

taxonomysession session = new taxonomysession(site); navigationterm navterm = taxonomynavigationcontext.current.navigationterm; term term = navterm.gettaxonomyterm(session); // cannot due permission level - user read user! string val = term.customproperties["..."]; // need - read value of custom property - without need access term class. 

is there way how read custom property read-only navigation term user assigned read permissions?

this work me seo properties, if debugging can see properties, can customproperties or localcustomproperties collection.

spsite site = new spsite(siteguid); spweb web = site.openweb();  taxonomysession session = new taxonomysession(site); navigationterm navtermino = taxonomynavigationcontext.current.navigationterm; term termino = navtermino.gettaxonomyterm(session);  //var seotitle = termino.customproperties.where(o => o.key == "_sys_seo_propbrowsertitle").singleordefault(); var seopropbrowsertitle = termino.localcustomproperties.where(o => o.key == "_sys_seo_propbrowsertitle").singleordefault(); var seopropdescription = termino.localcustomproperties.where(o => o.key == "_sys_seo_propdescription").singleordefault(); var seopropkeywords = termino.localcustomproperties.where(o => o.key == "_sys_seo_propkeywords").singleordefault(); var seopropsitenoindex = termino.localcustomproperties.where(o => o.key == "_sys_seo_propsitenoindex").singleordefault(); 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -