I am looking for a way to get defined categories in a portal's site directory, as far as I see categories I can, with many values, the type is represented as the field of "option", the user can choose the form
My problem is, how do I get "title" or " Can I distinguish category farms from the author? Actually, I have not forgotten the names of categories by hard work, but want to load them dynamically. I think that some criteria are also loaded categories dynamically as standard web part on the site directory page.
Unfortunately I could not find much information about this problem.
By Flo
Get a reference for SPEVB
< P> This code can get the list from the field xmlSchema. (This is not necessary, but the app is useful). Note: The commented XML is how the schematic of my own category field looks. Public stable aerialist GetCategory (SPWeb Web) {ArrayList result = new ArrayList (); / * & Lt ;? XML version = "1.0" encoding = "UTF-16"? & Gt; & Lt; Field id = "{6DF9BD52-550E-4a30-BC31-A4366832A87D}" type = "option" group = "_blank" name = "category" DisplayName = "category" SourceID = "http://schemas.microsoft.com/plainpoint / V3 "StaticName =" Category "& gt; & Lt; Options & gt; & Lt; CHOICE & gt; (1) Category 1 & lt; / CHOICE & gt; & Lt; CHOICE & gt; (2) Category 2 & lt; / CHOICE & gt; & Lt; CHOICE & gt; (3) Category 3 & lt; / CHOICE & gt; & Lt; / Options & gt; & Lt; Default & gt; (2) Category 2 & lt; / Default> & Lt; / Field & gt; * / Try {SPField catField = web.Fields [New Guid ("6DF9BD52-550E-4a30-BC31-A4366832A87D")]; XmlDocument Document = New XmlDocument (); Doc.LoadXml (catField.SchemaXml); XmlNodeList option = Doctor. Selection node ("Field / Options / Options"); Forex currency (option xmlnode choice) (add results (choice.intertext);}} hold (exception before) {result.Add ("failed:" + previous message);} return result;}
< / Pre>
Comments
Post a Comment