Class Paragraph
- Namespace
- Dynamicweb.Content
- Assembly
- Dynamicweb.dll
The Paragraph class models the concept of Paragraphs on a given Page (WebPage)
public class Paragraph : Entity<int>, IChangeTracking, IPermissionObject, IDisplayName, IPermissionLookup, IPermissionControlled
- Inheritance
-
Paragraph
- Implements
- Inherited Members
Constructors
Paragraph()
Initializes a new instance of the Paragraph class.
public Paragraph()
Paragraph(int)
Initializes a new instance of the Paragraph class with a relation to a page with the specified id
public Paragraph(int pageId)
Parameters
pageId
int- The id of the page to which the Paragraph will be associated
Properties
ApprovalState
Gets or sets the state of the approval.
public int ApprovalState { get; set; }
Property Value
- int
- The state of the approval.
ApprovalType
Gets the type of approval, draft, versioning or a workflow.
public int ApprovalType { get; }
Property Value
- int
- The type of the approval.
BottomSpace
Gets or sets the bottom space.
[Obsolete("Do not use")]
public int BottomSpace { get; set; }
Property Value
- int
- The bottom space.
ColumnsLarge
Gets or sets the large column used in grid based pages.
public int ColumnsLarge { get; set; }
Property Value
- int
- Represents how many columns the paragraph should take up in the grid for large displays
ColumnsMedium
Gets or sets the medium column used in grid based pages.
public int ColumnsMedium { get; set; }
Property Value
- int
- Represents how many columns the paragraph should take up in the grid for medium displays
ColumnsSmall
Gets or sets the small column used in grid based pages.
public int ColumnsSmall { get; set; }
Property Value
- int
- Represents how many columns the paragraph should take up in the grid for small displays
Container
Gets or sets the container.
public string Container { get; set; }
Property Value
- string
- The container.
ContainerId
Gets or sets the id of the container where the paragraph is placed (DEPRECATED?)
[Obsolete("Do not use")]
public string ContainerId { get; set; }
Property Value
CopyOf
Gets or sets the id of the Paragraph for which this is a copy of
public int CopyOf { get; set; }
Property Value
- int
- a value indicating the id of the Paragraph for which this is a copy of
GlobalCount
Gets the global count.
public int GlobalCount { get; }
Property Value
- int
- The global count.
Remarks
Lazy loaded, wrap in HasGlobal conditional before use
GlobalID
Gets or sets the global ID.
public int GlobalID { get; set; }
Property Value
- int
- The global ID.
GlobalRecordGlobalID
Gets or sets the global record global ID.
public int GlobalRecordGlobalID { get; set; }
Property Value
- int
- The global record global ID.
GlobalRecordPageID
Gets or sets the global record page ID.
public int GlobalRecordPageID { get; set; }
Property Value
- int
- The global record page ID.
GlobalRecordParagraphID
Gets or sets the global record paragraph ID.
public int GlobalRecordParagraphID { get; set; }
Property Value
- int
- The global record paragraph ID.
GlobalRecordSort
Gets or sets the global record sort.
public int GlobalRecordSort { get; set; }
Property Value
- int
- The global record sort.
GridRowColumn
Gets or sets the column number in which this paragraph is placed.
Only usable if the paragraph belongs to a GridRow which is done by setting the GridRowId property.
public int GridRowColumn { get; set; }
Property Value
GridRowId
Gets or sets the id of the GridRow to which this paragraph belongs.
public int GridRowId { get; set; }
Property Value
HasGlobal
Gets a value indicating whether this instance has global.
public bool HasGlobal { get; }
Property Value
- bool
true
if this instance has global; otherwise,false
.
Header
Gets or sets the header.
public string Header { get; set; }
Property Value
- string
- The header.
HideForDesktops
Gets or sets a value indicating whether this page should be hidden for desktops - that is devices not detected as phone or tablet.
public bool HideForDesktops { get; set; }
Property Value
- bool
true
if hide for desktops; otherwise,false
.
HideForPhones
Gets or sets a value indicating whether this page should be hidden for phones.
public bool HideForPhones { get; set; }
Property Value
- bool
true
if hide for phones; otherwise,false
.
HideForTablets
Gets or sets a value indicating whether this page should be hidden for tablets.
public bool HideForTablets { get; set; }
Property Value
- bool
true
if hide for tablets; otherwise,false
.
Icon
Gets the paragraph icon showing in backend.
public KnownIcon Icon { get; }
Property Value
- KnownIcon
- Returns either item type icon either module icon either ordinary paragraph icon.
IconColor
Gets the paragraph icon color showing in backend.
public KnownColor IconColor { get; }
Property Value
- KnownColor
- Returns either item type icon color either module icon color either ordinary paragraph icon color.
Image
Gets or sets the image.
public string Image { get; set; }
Property Value
- string
- The image.
ImageAlt
Gets or sets the image mouse over.
public string ImageAlt { get; set; }
Property Value
- string
- The image mouse over.
ImageCaption
Gets or sets the image caption.
public string ImageCaption { get; set; }
Property Value
- string
- The image caption.
ImageHAlign
Gets or sets the image H align.
public string ImageHAlign { get; set; }
Property Value
- string
- The image H align.
ImageHSpace
Gets or sets the image H space.
[Obsolete("Do not use")]
public int ImageHSpace { get; set; }
Property Value
- int
- The image H space.
ImageLinkTarget
Gets or sets the image link target.
public string ImageLinkTarget { get; set; }
Property Value
- string
- The image link target.
ImageMouseOver
Gets or sets the image mouse over.
[Obsolete("Use ImageAlt instead.")]
public string ImageMouseOver { get; set; }
Property Value
- string
- The image mouse over.
ImageNewWindow
Gets or sets a value indicating whether [image new window].
public bool ImageNewWindow { get; set; }
Property Value
- bool
true
if [image new window]; otherwise,false
.
ImageResize
Gets or sets a value indicating whether [image resize].
public bool ImageResize { get; set; }
Property Value
- bool
true
if [image resize]; otherwise,false
.
ImageTarget
Gets or sets the image target.
public string ImageTarget { get; set; }
Property Value
- string
- The image target.
ImageUrl
Gets or sets the image URL.
public string ImageUrl { get; set; }
Property Value
- string
- The image URL.
ImageVAlign
Gets or sets the image V align.
public string ImageVAlign { get; set; }
Property Value
- string
- The image V align.
ImageVSpace
Gets or sets the image V space.
[Obsolete("Do not use")]
public int ImageVSpace { get; set; }
Property Value
- int
- The image V space.
Index
Gets or sets a value indicating whether this Paragraph is index.
public bool Index { get; set; }
Property Value
- bool
true
if index; otherwise,false
.
IsGlobal
Gets a value indicating whether this instance is global.
public bool IsGlobal { get; }
Property Value
- bool
true
if this instance is global; otherwise,false
.
IsMaster
Gets a value indicating whether this instance is master.
public bool IsMaster { get; }
Property Value
- bool
true
if this instance is master; otherwise,false
.
IsMoving
Gets or sets a value indicating if this Paragraph is currently in the process of being moved between Pages
public bool IsMoving { get; set; }
Property Value
IsTemplate
Gets or sets a value indicating whether this instance is template.
public bool IsTemplate { get; set; }
Property Value
- bool
true
if this instance is template; otherwise,false
.
Item
Gets the item of the current paragraph
public Item Item { get; }
Property Value
- Item
- Item
ItemId
Gets or sets the Id of the associated content item.
public string ItemId { get; set; }
Property Value
ItemType
Gets or sets the type of the associated item.
public string ItemType { get; set; }
Property Value
Languages
Gets the language versions of the paragraph.
public IEnumerable<Paragraph> Languages { get; }
Property Value
- IEnumerable<Paragraph>
- The languages. Returns
(Nothing in Visual Basic) if the paragraph is not a master.null
MasterParagraphID
Gets or sets the master paragraph ID.
public int MasterParagraphID { get; set; }
Property Value
- int
- The master paragraph ID.
ModuleCss
Gets or sets the module CSS.
[Obsolete("Do not use")]
public string ModuleCss { get; set; }
Property Value
- string
- The module CSS.
ModuleJS
Gets or sets the module JS.
[Obsolete("Do not use")]
public string ModuleJS { get; set; }
Property Value
- string
- The module JS.
ModuleProperties
Gets or sets the module properties.
public Properties ModuleProperties { get; set; }
Property Value
- Properties
- The module properties.
ModuleSettings
Gets or sets the module settings.
public string ModuleSettings { get; set; }
Property Value
- string
- The module settings.
ModuleSystemName
Gets or sets the name of the module system.
public string ModuleSystemName { get; set; }
Property Value
- string
- The name of the module system.
Page
Gets the Page to which this Paragraph belongs
public Page Page { get; }
Property Value
- Page
- The page.
PageID
Gets or sets the id of the page to which this Paragraph belongs
public int PageID { get; set; }
Property Value
- int
- The page ID.
ParentContainer
Gets or sets the parent containerId (row) where the paragraph is placed (DEPRECATED?)
[Obsolete("Do not use")]
public string ParentContainer { get; set; }
Property Value
ParentRowId
Gets or sets the parent row id for paragraphs rendered inside a row to identify which row the paragraph belongs to.
public int ParentRowId { get; set; }
Property Value
- int
- The parent row identifier.
Remarks
Used with the Sort to define where to render the paragraph
Permissions
Gets or sets the permissions for this Paragraph
public Permissions Permissions { get; set; }
Property Value
Preview
Gets or sets a value indicating whether this Paragraph is preview.
public bool Preview { get; set; }
Property Value
- bool
true
if preview; otherwise,false
.
RawContainer
Gets the container raw value.
public string RawContainer { get; }
Property Value
RowColor
Gets or sets the color of the row for paragraphs rendered as rows in grid enabled placeholders.
public string RowColor { get; set; }
Property Value
- string
- The color of the row, i.e. #e1e1e1.
RowCssClass
Gets or sets the row CSS class for paragraphs rendered as rows in grid enabled placeholders.
public string RowCssClass { get; set; }
Property Value
- string
- The row CSS class, i.e. highRow.
RowId
Gets or sets the row id for paragraphs rendered as rows in grid enabled placeholders.
public string RowId { get; set; }
Property Value
- string
- The id of the type of row - defines how many columns there is in the row and their sizes.
RowImage
Gets or sets the row image (background image) for paragraphs rendered as rows in grid enabled placeholders.
public string RowImage { get; set; }
Property Value
- string
- The rows background image (/Files/Images/Backgrounds/Background1.jpg).
ShowHeader
Gets or sets a value indicating whether [show header].
[Obsolete("Do not use")]
public bool ShowHeader { get; set; }
Property Value
- bool
true
if [show header]; otherwise,false
.
ShowParagraph
Gets or sets a value indicating whether [show paragraph].
public bool ShowParagraph { get; set; }
Property Value
- bool
true
if [show paragraph]; otherwise,false
.
Remarks
By design, grid row paragraphs must be active.
Sort
Gets or sets the sort.
public int Sort { get; set; }
Property Value
- int
- The sort.
Template
Gets or sets the template.
public string Template { get; set; }
Property Value
- string
- The template.
TemplateDescription
Gets or sets the template description.
public string TemplateDescription { get; set; }
Property Value
- string
- The template description.
TemplateID
Gets or sets the template ID.
[Obsolete("Do not use")]
public int TemplateID { get; set; }
Property Value
- int
- The template ID.
Text
Gets or sets the text.
public string Text { get; set; }
Property Value
- string
- The text.
UniqueId
Gets or sets the unique identifier for paragraphs used in copy and deploy scenarios.
public Guid UniqueId { get; set; }
Property Value
- Guid
- The unique identifier.
UserManagementPermissions
Gets or sets the user management permissions.
public Permissions UserManagementPermissions { get; set; }
Property Value
- Permissions
- The user management permissions.
ValidFrom
Gets or sets the valid from.
public DateTime ValidFrom { get; set; }
Property Value
- DateTime
- The valid from.
ValidTo
Gets or sets the valid to.
public DateTime ValidTo { get; set; }
Property Value
- DateTime
- The valid to.
Variation
Gets or sets the variation of this paragraph in context of an OMC.
public int Variation { get; set; }
Property Value
- int
- The variation - 1-N depending on the setup.
Remarks
Variation = 1 is the original.
VersionTimeStamp
Gets or sets the version time stamp.
public DateTime VersionTimeStamp { get; set; }
Property Value
- DateTime
- The version time stamp.
Methods
BackendUserHasPermissionToEdit()
Check edit permissions for paragraph
[Obsolete("Do not use")]
public bool BackendUserHasPermissionToEdit()
Returns
- bool
- Returns true if the current backend user has permission to edit the paragraph. Returns false if no backend user is found, or if the current backend user doesn't have permission to edit the paragraph
GetByKey(string)
Can be used to look up a concrete object based upon the key.
public IPermissionControlled GetByKey(string key)
Parameters
key
string- Identifier
Returns
- IPermissionControlled
- permissionControlled
GetDisplayName()
Yields a human-readable name for rendering.
public string GetDisplayName()
Returns
- string
- name
GetModuleIcon()
public string GetModuleIcon()
Returns
GetParent()
Gets the parent of this object, for the purposes of inherited permissions.
public IPermissionControlled GetParent()
Returns
- IPermissionControlled
- parent
Remarks
Return null, if no parent permissions exist
GetPermissionIdentifier()
Combination of values that form a unique identifier.
public UnifiedPermissionIdentifier GetPermissionIdentifier()
Returns
- UnifiedPermissionIdentifier
- Unique identifier.
MarkAsModified()
public void MarkAsModified()