Table of Contents

Class Renderer

Namespace
Dynamicweb.Content.Items.Rendering
Assembly
Dynamicweb.dll

Provides methods and properties for rendering items in the frontend.

public class Renderer
Inheritance
Renderer
Inherited Members

Constructors

Renderer()

Initializes a new instance of an object.

public Renderer()

Renderer(string)

Initializes a new instance of an object.

public Renderer(string tagNamespace)

Parameters

tagNamespace string

Tag namespace.

Properties

DetailsPageId

Gets or sets the page Id for details.

public int DetailsPageId { get; set; }

Property Value

int

DetailsParagraphId

Gets or sets the paragraph Id for details.

public int DetailsParagraphId { get; set; }

Property Value

int

NestingLevel

Gets or sets current nesting level of rendering(increased by link to item, item list).

public int NestingLevel { get; set; }

Property Value

int

PageId

Gets or sets the page Id.

public int PageId { get; set; }

Property Value

int

PagingPosition

Gets number of current page according to paging position

public int PagingPosition { get; }

Property Value

int

ParagraphId

Gets or sets the paragraph Id.

public int ParagraphId { get; set; }

Property Value

int

TagNamespace

Gets or sets the tag namespace for all tags.

public string TagNamespace { get; set; }

Property Value

string

ValueConverter

Gets or sets the value converter.

protected ValueConverter ValueConverter { get; set; }

Property Value

ValueConverter

Methods

NormalizeTagPrefix(string)

Normalizes tag prefix by removing reduntnat "." and ":" and cleaning leading and trailing whitespaces.

protected virtual string NormalizeTagPrefix(string prefix)

Parameters

prefix string

Tag prefix to normalize.

Returns

string

Normalized tag prefix.

RenderAreaItem(ItemEntry, Template)

Renders the given item.

public void RenderAreaItem(ItemEntry item, Template template)

Parameters

item ItemEntry

Item.

template Template

Template.

RenderGlobalTags(Template)

Renders global tags.

protected virtual void RenderGlobalTags(Template template)

Parameters

template Template

Template.

RenderItem(ItemEntry, ItemSettings)

Renders the given item.

public virtual void RenderItem(ItemEntry item, ItemSettings settings)

Parameters

item ItemEntry

Item.

settings ItemSettings

Item settings.

RenderItem(ItemEntry, Template)

Renders the given item.

public void RenderItem(ItemEntry item, Template template)

Parameters

item ItemEntry

Item.

template Template

Template.

RenderItemType(ItemType, ItemTypeSettings)

Renders item type details.

public virtual void RenderItemType(ItemType itemType, ItemTypeSettings settings)

Parameters

itemType ItemType

Item type.

settings ItemTypeSettings

Settings.

RenderItemType(ItemType, Template)

Renders item type details.

public virtual void RenderItemType(ItemType itemType, Template template)

Parameters

itemType ItemType

Item type.

template Template

Template.

RenderItems(IEnumerable<ItemEntry>, ItemListSettings)

Renders items list.

public virtual void RenderItems(IEnumerable<ItemEntry> items, ItemListSettings settings)

Parameters

items IEnumerable<ItemEntry>

Items to render.

settings ItemListSettings

List settings.

RenderItems(IEnumerable<ItemEntry>, Template)

Renders items list.

public virtual void RenderItems(IEnumerable<ItemEntry> items, Template template)

Parameters

items IEnumerable<ItemEntry>

Items to render.

template Template

Template.

Renders action link.

protected virtual void RenderLink(string query, Template template, string tagName)

Parameters

query string

Query.

template Template

Template.

tagName string

Tag name.

RenderPagePropertyItem(ItemEntry, Template)

Renders the given item.

public void RenderPagePropertyItem(ItemEntry item, Template template)

Parameters

item ItemEntry

Item.

template Template

Template.

RenderPaging(PagingSettings)

Renders paging tags.

public virtual void RenderPaging(PagingSettings settings)

Parameters

settings PagingSettings

Paging settings.

RenderPagingSequence(Template, int, int, int, int, string, Func<int, string>)

Render paging loop.

protected virtual void RenderPagingSequence(Template template, int startPage, int endPage, int currentPage, int totalPages, string tagPrefix, Func<int, string> linkGenerator)

Parameters

template Template

Loop.

startPage int

Start page.

endPage int

End page.

currentPage int

Current page.

totalPages int

Total pages.

tagPrefix string

Tag prefix.

linkGenerator Func<int, string>

Page URL generator.

RenderPropertyItem(ItemEntry, Template, string)

Renders the given item.

public void RenderPropertyItem(ItemEntry item, Template template, string tagPrefix)

Parameters

item ItemEntry

Item.

template Template

Template.

tagPrefix string

RenderValidationError(Template, List<Tuple<string, string, string>>)

Renders validation error.

public virtual void RenderValidationError(Template template, List<Tuple<string, string, string>> errorMessages)

Parameters

template Template

Template.

errorMessages List<Tuple<string, string, string>>

Error messages.

RenderValue(object, Type, Template, string)

Renders the value.

public virtual void RenderValue(object value, Type valueType, Template template, string tagName)

Parameters

value object

Value to render.

valueType Type

Value type.

template Template

Template.

tagName string

Tag name.

To top