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
itemItemThe item
listNamestringList name for new item
pagePagePage with list name
sortIndexintIndex 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
readerIDataReaderReader to read data from.
FillRow(DataRow)
Fills the given DataRow object with object state values.
protected override void FillRow(DataRow row)
Parameters
rowDataRowRow to write data into.
GetListById(int)
Gets named item list by ID
public static NamedItemList GetListById(int listId)
Parameters
listIdintThe 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.ListSourceTypeThe source type
sourceIdintThe source id
Returns
GetListsByArea(int)
Gets named item lists by area
public static IEnumerable<NamedItemList> GetListsByArea(int areaId)
Parameters
areaIdintThe area id
Returns
GetListsBySource(ListSourceType, int)
Gets named item lists by source
public static IEnumerable<NamedItemList> GetListsBySource(NamedItemList.ListSourceType sourceType, int sourceId)
Parameters
sourceTypeNamedItemList.ListSourceTypeThe source type
sourceIdintThe source id
Returns
GetNamedItemListByListId(int)
Gets named item lists by his list Id
public static NamedItemList GetNamedItemListByListId(int listId)
Parameters
listIdintThe list id
Returns
GetNamedItemListsBySourceType(ListSourceType)
Gets named item lists by source type
public static IEnumerable<NamedItemList> GetNamedItemListsBySourceType(NamedItemList.ListSourceType sourceType)
Parameters
sourceTypeNamedItemList.ListSourceTypeThe source type