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
Item- The item
listName
string- List name for new item
page
Page- Page with list name
sortIndex
int- 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
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
IDataReader- Reader to read data from.
FillRow(DataRow)
Fills the given DataRow object with object state values.
protected override void FillRow(DataRow row)
Parameters
row
DataRow- Row to write data into.
GetListById(int)
Gets named item list by ID
public static NamedItemList GetListById(int listId)
Parameters
listId
int- 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
name
stringsourceType
NamedItemList.ListSourceType- The source type
sourceId
int- The source id
Returns
GetListsByArea(int)
Gets named item lists by area
public static IEnumerable<NamedItemList> GetListsByArea(int areaId)
Parameters
areaId
int- The 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.ListSourceType- The source type
sourceId
int- The source id
Returns
GetNamedItemListByID(int)
[Obsolete("Use GetListById instead")]
public static NamedItemList GetNamedItemListByID(int listID)
Parameters
listID
int
Returns
GetNamedItemListByListId(int)
Gets named item lists by his list Id
public static NamedItemList GetNamedItemListByListId(int listId)
Parameters
listId
int- The list id
Returns
GetNamedItemListByName(string, ListSourceType, int)
[Obsolete("Use GetListByName instead")]
public static NamedItemList GetNamedItemListByName(string name, NamedItemList.ListSourceType sourceType, int sourceID)
Parameters
name
stringsourceType
NamedItemList.ListSourceTypesourceID
int
Returns
GetNamedItemListsByArea(int)
[Obsolete("Use GetListsByArea instead")]
public static IEnumerable<NamedItemList> GetNamedItemListsByArea(int areadId)
Parameters
areadId
int
Returns
GetNamedItemListsBySource(ListSourceType, int)
[Obsolete("Use GetListsBySource instead")]
public static IEnumerable<NamedItemList> GetNamedItemListsBySource(NamedItemList.ListSourceType sourceType, int sourceID)
Parameters
sourceType
NamedItemList.ListSourceTypesourceID
int
Returns
GetNamedItemListsBySourceType(ListSourceType)
Gets named item lists by source type
public static IEnumerable<NamedItemList> GetNamedItemListsBySourceType(NamedItemList.ListSourceType sourceType)
Parameters
sourceType
NamedItemList.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
name
stringitemType
stringsourceType
NamedItemList.ListSourceTypesourceID
int