![]() ![]() For example, to iterate the fields of the context item: item = įoreach ( field in item.Get ready for an unforgettable journey to the magic world of the Middle Ages! You will meet your old friends, Professor and Aurora, and help Prince Eric rebuild his kingdom and protect it from the evil plans of villains! Fight treacherous monsters, explore new territories, construct various buildings, search for the magical artefacts and play with your friends online! To ensure that Sitecore retrieves all field values for an item, invoke the .ReadAll method. ![]() Sitecore retrieves data only when necessary. For example, to update the value of the Title field in the /Sitecore/Content/Home item in the Master database: master = ("master") You can use the .Value property to update the value of a field. If you access the field by ID ( item.Fields) and it does not exist in the item, then the .Fields collection returns a “new” object which does not belong to the item template. If you access the field by its name ( item.Fields) and it does not exist in the item, then the .Fields collection returns Null. For example, to clear the Title field in the /Sitecore/Content/Home item in the Master database: master = ("master") You can clear any field by setting its value to an empty string by using the collection exposed by the class. Home = "//TODO: replace with appropriate value" ![]() home = master.GetItem("/sitecore/content/home") For example, to update the value of the Title field in the / Sitecore/Content/Home item in the Master database: master = ("master") You can update the value of any field by using the collection exposed by the class. ![]() If the specified field does not exist, the collection exposed by returns an empty string, never Null. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |