Compare Page Revisions
« Older Revision - Back to Page History - Newer Revision »
ConnectionStrings.config
/App_Config
Product
ProductCategory
dbo.Items
Sitecore.Kernel.DLL
w3wp.exe
Sitecore.Context.Item
LinkManager.GetItemUrl()
LinkManager.GetDynamicUrl()
MediaManager.GetMediaUrl()
using (new SecurityDisabler()) { var db = Factory.GetDatabase("master"); var item = db.SelectItems("/sitecore/content/data[@name='yyz']); if (items != null) { // do something with items } }
Item dataFolder = null; TemplateItem templateItem = null; string cUser = ""; try { using (new SecurityDisabler()) { var db = Factory.GetDatabase("master"); dataFolder = db.GetItem("/sitecore/content/data"); templateItem = db.Templates["MyTemplates/Template2"]; } var newItem = dataFolder.Add("Item Name", templateItem); newItem.Editing.BeginEdit(); newItem["FieldName"] = "xyz"; newItem.Editing.EndEdit(); } catch (Exception error) { throw; }
var item = Sitecore.Context.Item; var fld = items.Fields["fieldName"]; if (fld != null && !string.IsNullOrEmpty(fld.Value)) { // Do something }
fld.Value
HtmlField fld
fld.InnerField.Value
CheckboxField fld
fld.Checked
DateField fld
fld.DateTime
LinkField fld
fld.Url
ImageField fld
string imageURL = StringUtil.EnsurePrefix('/', MediaManager.GetMediaUrl(fld.MediaItem));
NameValueList fld
WebUtil
ParseUrlParameters
ReferenceField fld
fld.ID
MultilistField fld
fld.GetItems() // returns array of Items
Database
Axes
sc:EditFrame
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.