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
item
ItemThe item
listName
stringList name for new item
page
PagePage with list name
sortIndex
intIndex 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
name
stringitemType
stringsourceType
NamedItemList.ListSourceTypesourceId
int
Returns
Delete(int)
Deletes the named list
public override void Delete(int id)
Parameters
id
int
Fill(IDataReader)
Fills object properties with data from the given IDataReader object.
public override void Fill(IDataReader reader)
Parameters
reader
IDataReaderReader to read data from.
FillRow(DataRow)
Fills the given DataRow object with object state values.
protected override void FillRow(DataRow row)
Parameters
row
DataRowRow to write data into.
GetListById(int)
Gets named item list by ID
public static NamedItemList GetListById(int listId)
Parameters
listId
intThe 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
name
stringsourceType
NamedItemList.ListSourceTypeThe source type
sourceId
intThe source id
Returns
GetListsByArea(int)
Gets named item lists by area
public static IEnumerable<NamedItemList> GetListsByArea(int areaId)
Parameters
areaId
intThe area id
Returns
GetListsBySource(ListSourceType, int)
Gets named item lists by source
public static IEnumerable<NamedItemList> GetListsBySource(NamedItemList.ListSourceType sourceType, int sourceId)
Parameters
sourceType
NamedItemList.ListSourceTypeThe source type
sourceId
intThe source id
Returns
GetNamedItemListByListId(int)
Gets named item lists by his list Id
public static NamedItemList GetNamedItemListByListId(int listId)
Parameters
listId
intThe list id
Returns
GetNamedItemListsBySourceType(ListSourceType)
Gets named item lists by source type
public static IEnumerable<NamedItemList> GetNamedItemListsBySourceType(NamedItemList.ListSourceType sourceType)
Parameters
sourceType
NamedItemList.ListSourceTypeThe source type