Table of Contents

Class ItemViewModel

Namespace
Dynamicweb.Frontend
Assembly
Dynamicweb.dll
ItemViewModel represents the rendering context used when an item is rendered.
public class ItemViewModel : ViewModelBase
Inheritance
ItemViewModel
Inherited Members

Constructors

ItemViewModel()

Initializes a new instance of the ItemViewModel class.
public ItemViewModel()
See Also

Properties

Fields

Gets or sets the fields.
public IList<ItemFieldViewModel> Fields { get; set; }

Property Value

IList<ItemFieldViewModel>
The fields.
See Also

Id

Gets or sets the identifier.
public string Id { get; set; }

Property Value

string
The identifier.
See Also
Gets or sets the link.
public string Link { get; set; }

Property Value

string
The link.
See Also

PageID

Gets or sets the page id.
public int PageID { get; set; }

Property Value

int
the page id.
See Also

ParagraphID

Gets or sets the paragraph id.
public int ParagraphID { get; set; }

Property Value

int
The paragraph id.
See Also

SystemName

Gets or sets the system name.
public string SystemName { get; set; }

Property Value

string
The system name.
See Also

Methods

GetBoolean(string)

Gets the boolean.
public bool GetBoolean(string systemName)

Parameters

systemName string
The field system name.

Returns

bool
true or false, which reflects the value stored in specified field.
See Also

GetColor(string)

Gets the hex value of a color.
public ColorViewModel GetColor(string systemName)

Parameters

systemName string
The field system name.

Returns

ColorViewModel
Hex value of a color starts with # char.

Remarks

For the transparent color method returns an empty string.
See Also

GetDateTime(string)

Gets the date time.
public DateTime GetDateTime(string systemName)

Parameters

systemName string
The field system name.

Returns

DateTime
System.DateTime.
See Also

GetDecimal(string)

Gets the decimal.
public decimal GetDecimal(string systemName)

Parameters

systemName string
The field system name.

Returns

decimal
System.Decimal.
See Also

GetDouble(string)

Gets the double.
public double GetDouble(string systemName)

Parameters

systemName string
The field system name.

Returns

double
System.Double.
See Also

GetField(string)

Gets the field.
public ItemFieldViewModel GetField(string systemName)

Parameters

systemName string
The field system name.

Returns

ItemFieldViewModel
ItemFieldModel.
See Also

GetFile(string)

Gets the file.
public FileViewModel GetFile(string systemName)

Parameters

systemName string
The field system name.

Returns

FileViewModel
FileViewModel.
See Also

GetFiles(string)

Gets the files.
public IList<FileViewModel> GetFiles(string systemName)

Parameters

systemName string
The field system name.

Returns

IList<FileViewModel>
IList(Of FileViewModel).
See Also

GetGeolocation(string)

Gets the geolocation.
public GeolocationViewModel GetGeolocation(string systemName)

Parameters

systemName string
The field system name.

Returns

GeolocationViewModel
GeolocationViewModel.
See Also

GetGoogleFont(string)

Gets the google font.
public GoogleFontViewModel GetGoogleFont(string systemName)

Parameters

systemName string
The field system name.

Returns

GoogleFontViewModel
GoogleFontViewModel
See Also

GetInt32(string)

Gets the int32.
public int GetInt32(string systemName)

Parameters

systemName string
The field system name.

Returns

int
System.Int32.
See Also

GetInt64(string)

Gets the int64.
public long GetInt64(string systemName)

Parameters

systemName string
The field system name.

Returns

long
System.Int64.
See Also

GetItem(string)

Gets the item.
public ItemViewModel GetItem(string systemName)

Parameters

systemName string
The field system name.

Returns

ItemViewModel
ItemViewModel.
See Also

GetItems(string)

Gets the items.
public IList<ItemViewModel> GetItems(string systemName)

Parameters

systemName string
The field system name.

Returns

IList<ItemViewModel>
IList(Of ItemViewModel).
See Also
Gets the link.
public LinkViewModel GetLink(string systemName)

Parameters

systemName string
The field system name.

Returns

LinkViewModel
See LinkViewModel
See Also

GetList(string)

Gets the list.
public ListViewModel GetList(string systemName)

Parameters

systemName string
The field system name.

Returns

ListViewModel
See Also

GetRawValue(string)

Gets the raw unmodified value from the database without any parsing
public object GetRawValue(string systemName)

Parameters

systemName string
System name of the field to return value for

Returns

object
An object of the values underlying database type. Int, String, Boolean etc. Never another viewmodel or object
See Also

GetRawValueString(string)

Gets the raw unmodified value from the database without any parsing but converted to string
public string GetRawValueString(string systemName)

Parameters

systemName string
System name of the field to return value for

Returns

string
A string of the underlying raw value.
See Also

GetRawValueString(string, string)

Gets the raw unmodified value from the database without any parsing but converted to string
public string GetRawValueString(string systemName, string defaultValue)

Parameters

systemName string
System name of the field to return value for
defaultValue string
Value to return if the field does not return any value

Returns

string
A string of the underlying raw value.
See Also

GetString(string)

Gets the string.
public string GetString(string systemName)

Parameters

systemName string
The field system name.

Returns

string
System.String.
See Also

GetString(string, string)

Gets the value of the field in string format. Returns the default value if the field value is null or empty string.
public string GetString(string systemName, string defaultValue)

Parameters

systemName string
System name of the field to return value for
defaultValue string
Value to return if the field does not return any value

Returns

string
A string of the underlying raw value.
See Also

GetUsers(string)

Gets the users.
public IList<UserViewModel> GetUsers(string systemName)

Parameters

systemName string
The field system name.

Returns

IList<UserViewModel>
IList(Of UserViewModel).
See Also

GetValue(string)

Gets the value.
public object GetValue(string systemName)

Parameters

systemName string
The field system name.

Returns

object
System.Object.
See Also

GetValue<T>(string)

Gets the value.
public T GetValue<T>(string systemName) where T : class

Parameters

systemName string
The field system name.

Returns

T
T.

Type Parameters

T
See Also

See Also

To top