Class NamedItemList
- Namespace
- Dynamicweb.Content.Items
- Assembly
- Dynamicweb.dll
NamedItemList connects an ItemList to a something (a Page, an Area, ...)
public class NamedItemList : DbObject
- Inheritance
-
NamedItemList
- Inherited Members
Constructors
NamedItemList()
public NamedItemList()
Properties
ItemList
Gets or sets the item list.
public ItemList ItemList { get; }
Property Value
ItemListId
Gets or sets the id of the item list.
public int ItemListId { get; set; }
Property Value
Name
Gets or sets the name of the named item list.
public string Name { get; set; }
Property Value
SourceId
Gets or sets the id of the owner.
public int SourceId { get; set; }
Property Value
SourceType
Gets or sets the type of the owner(a Page, an Area, an Item ...).
public string SourceType { get; set; }
Property Value
Methods
Add(Item, string, Page)
Add an item to a named item list
public static NamedItemList Add(Item item, string listName, Page page)
Parameters
Returns
Add(Item, string, Page, int)
Add an item to a named item list
public static NamedItemList Add(Item item, string listName, Page page, int sortIndex)
Parameters
itemItem- The item
listNamestring- List name for new item
pagePage- Page with list name
sortIndexint- Index of item in list
Returns
Create(string, string, ListSourceType, int)
Create a new named list with all required properties
public static NamedItemList Create(string name, string itemType, NamedItemList.ListSourceType sourceType, int sourceId)
Parameters
namestringitemTypestringsourceTypeNamedItemList.ListSourceTypesourceIdint
Returns
Delete(int)
Deletes the named list
public override void Delete(int id)
Parameters
idint
Fill(IDataReader)
Fills object properties with data from the given IDataReader object.
public override void Fill(IDataReader reader)
Parameters
readerIDataReader- Reader to read data from.
FillRow(DataRow)
Fills the given DataRow object with object state values.
protected override void FillRow(DataRow row)
Parameters
rowDataRow- Row to write data into.
GetListById(int)
Gets named item list by ID
public static NamedItemList GetListById(int listId)
Parameters
listIdint- The item list id
Returns
GetListByName(string, ListSourceType, int)
Gets named item lists by source
public static NamedItemList GetListByName(string name, NamedItemList.ListSourceType sourceType, int sourceId)
Parameters
namestringsourceTypeNamedItemList.ListSourceType- The source type
sourceIdint- The source id
Returns
GetListsByArea(int)
Gets named item lists by area
public static IEnumerable<NamedItemList> GetListsByArea(int areaId)
Parameters
areaIdint- The area id
Returns
GetListsBySource(ListSourceType, int)
Gets named item lists by source
public static IEnumerable<NamedItemList> GetListsBySource(NamedItemList.ListSourceType sourceType, int sourceId)
Parameters
sourceTypeNamedItemList.ListSourceType- The source type
sourceIdint- The source id
Returns
GetNamedItemListByID(int)
[Obsolete("Use GetListById instead")]
public static NamedItemList GetNamedItemListByID(int listID)
Parameters
listIDint
Returns
GetNamedItemListByListId(int)
Gets named item lists by his list Id
public static NamedItemList GetNamedItemListByListId(int listId)
Parameters
listIdint- The list id
Returns
GetNamedItemListByName(string, ListSourceType, int)
[Obsolete("Use GetListByName instead")]
public static NamedItemList GetNamedItemListByName(string name, NamedItemList.ListSourceType sourceType, int sourceID)
Parameters
namestringsourceTypeNamedItemList.ListSourceTypesourceIDint
Returns
GetNamedItemListsByArea(int)
[Obsolete("Use GetListsByArea instead")]
public static IEnumerable<NamedItemList> GetNamedItemListsByArea(int areadId)
Parameters
areadIdint
Returns
GetNamedItemListsBySource(ListSourceType, int)
[Obsolete("Use GetListsBySource instead")]
public static IEnumerable<NamedItemList> GetNamedItemListsBySource(NamedItemList.ListSourceType sourceType, int sourceID)
Parameters
sourceTypeNamedItemList.ListSourceTypesourceIDint
Returns
GetNamedItemListsBySourceType(ListSourceType)
Gets named item lists by source type
public static IEnumerable<NamedItemList> GetNamedItemListsBySourceType(NamedItemList.ListSourceType sourceType)
Parameters
sourceTypeNamedItemList.ListSourceType- The source type
Returns
Save(string, string, ListSourceType, int)
[Obsolete("Use Create instead")]
public void Save(string name, string itemType, NamedItemList.ListSourceType sourceType, int sourceID)
Parameters
namestringitemTypestringsourceTypeNamedItemList.ListSourceTypesourceIDint