Table of Contents

Class ExampleAllFieldTypesItem

Namespace
Dynamicweb.Examples.Items
Assembly
Dynamicweb.Examples.dll
[Item("Item with all field types", "The example of code-first item")]
[AreaRule]
[ModuleAttachmentRule(true)]
[StructureRule(new StructureContextType[] { StructureContextType.Pages, StructureContextType.Paragraphs })]
[ParentRule(new ParentRestrictionRule.ParentType[] { ParentRestrictionRule.ParentType.RootOfWebsite, ParentRestrictionRule.ParentType.RegularPage })]
[ChildRule(true)]
[ChildRule(new string[] { "ExampleCategory", "ExampleRegion" })]
[Category("Example")]
[PageDefaultView(PageDefaultView.Paragraph)]
[Icon(KnownIcon.Archive)]
public class ExampleAllFieldTypesItem : ItemEntry
Inheritance
ExampleAllFieldTypesItem
Inherited Members

Properties

FieldCheckbox

[Group("StandardFields")]
[Checkbox]
public bool FieldCheckbox { get; set; }

Property Value

bool

FieldCheckboxList

[Group("ListFields")]
[CheckboxList(AllowOptionsSorting = true)]
[OptionSql("SELECT TOP 10 ProductId, ProductName FROM EcomProducts WHERE ProductPrice > 100", "ProductName", "ProductId")]
public IEnumerable<string> FieldCheckboxList { get; set; }

Property Value

IEnumerable<string>

FieldColor

[Group("StandardFields")]
[Color("Color", Presets = "#FFF, #151515, #444544, #5E5E5E, #005731, #287D59, #31988D, #2D73AB, #384E9A, #703F96, #9F3F95, #A93948, #E6A04B, #DD823A, #9BBF53, #0085CA, #1C588F")]
[DefaultValue("#151515")]
public string FieldColor { get; set; }

Property Value

string

FieldDate

[Group("StandardFields")]
[DefaultValue("Now")]
public DateTime FieldDate { get; set; }

Property Value

DateTime

FieldDateTime

[Group("StandardFields")]
[DefaultValue("Now")]
[DateTime]
public DateTime FieldDateTime { get; set; }

Property Value

DateTime

FieldDecimal

[Group("StandardFields")]
[Decimal]
public decimal FieldDecimal { get; set; }

Property Value

decimal

FieldDropdownList

[Group("ListFields", LayoutGroupMetadata.GroupCollapsibleState.Collapsed)]
[DropdownList(RemoveNothingSelected = true)]
[OptionItem("ExampleCategory", "Name", "Id", SourceType = FieldOptionItemSourceType.CurrentArea)]
public string FieldDropdownList { get; set; }

Property Value

string

FieldEditableList

[Group("ListFields")]
[EditableList]
public string FieldEditableList { get; set; }

Property Value

string

FieldFile

[Group("StandardFields")]
[File("File", "/Images/Products", "gif,jpg,png", AllowFrontendUpload = true, ShowAsImageSelector = true, UseFocalSelector = true)]
public string FieldFile { get; set; }

Property Value

string

FieldFolder

[Group("StandardFields")]
[Folder("Folder", "*.png")]
public string FieldFolder { get; set; }

Property Value

string

FieldFontColor

[Group("StandardFields")]
[ColorSwatch("Font color")]
public string FieldFontColor { get; set; }

Property Value

string

FieldGeolocation

[Group("StandardFields")]
[Geolocation("Geolocation", AddressFields = "Street,Number,City,Zip")]
public string FieldGeolocation { get; set; }

Property Value

string

FieldGoogleFont

[Group("StandardFields")]
[GoogleFont("Google font", "Lato", "italic")]
public string FieldGoogleFont { get; set; }

Property Value

string

FieldGroup

[Group("SpecialFields")]
[User(Name = "Group", ShowType = UserAttribute.ShowTypes.Groups)]
public string FieldGroup { get; set; }

Property Value

string

FieldGroupsAndUsers

[Group("SpecialFields")]
[User(Name = "Group and users", ShowType = UserAttribute.ShowTypes.GroupsAndUsers)]
public string FieldGroupsAndUsers { get; set; }

Property Value

string

FieldHidden

[Group("StandardFields")]
[HiddenField]
public string FieldHidden { get; set; }

Property Value

string

FieldHtml5

[Group("StandardFields")]
[InputHtml5("Html5", InputType = "Number", Min = 0, Max = 10)]
public int FieldHtml5 { get; set; }

Property Value

int

FieldInteger

[Group("StandardFields")]
[Integer]
public int FieldInteger { get; set; }

Property Value

int

FieldItem

[Group("StandardFields")]
[ItemTypeEditor("Item", "ExampleCustomer")]
public string FieldItem { get; set; }

Property Value

string
[Group("StandardFields")]
[Link]
public string FieldLink { get; set; }

Property Value

string

FieldLinkToItem

[Group("StandardFields")]
[LinkToItem]
public string FieldLinkToItem { get; set; }

Property Value

string

FieldLongText

[Group("StandardFields")]
[LongText]
public string FieldLongText { get; set; }

Property Value

string

FieldPassword

[Group("StandardFields")]
[Password]
public string FieldPassword { get; set; }

Property Value

string

FieldRadiobuttonList

[Group("ListFields")]
[RadiobuttonList]
[Option("News")]
[Option("Featured")]
[Option("Add")]
[DefaultValue("News")]
public string FieldRadiobuttonList { get; set; }

Property Value

string

FieldRadioFolderList

[Group("ListFields")]
[RadiobuttonList(IconPosition = 1, IconMaxWidth = 140, IconMaxHeight = 100)]
[OptionFolder("/Images")]
public string FieldRadioFolderList { get; set; }

Property Value

string

FieldRelationList

[Group("StandardFields")]
[ItemRelationList("Relation list", "ExampleNewsItem", ItemRelationListEditor.ItemListSource.Page, new string[] { "Title", "SubTitle" })]
[Option("Title")]
[Option("Subtitle")]
[Option("NewsType")]
public int FieldRelationList { get; set; }

Property Value

int

FieldRichText

[Group("StandardFields")]
[RichText]
public string FieldRichText { get; set; }

Property Value

string

FieldText

[Group("StandardFields")]
public string FieldText { get; set; }

Property Value

string

FieldUser

[Group("SpecialFields")]
[User(Name = "User")]
public string FieldUser { get; set; }

Property Value

string
To top