Table of Contents

Class LayoutTemplateLocator

Namespace
Dynamicweb.Content.Layouts
Assembly
Dynamicweb.dll

Static methods for locating the appropiate layout template.

public static class LayoutTemplateLocator
Inheritance
LayoutTemplateLocator
Inherited Members

Methods

FindLayoutTemplateForPage(Page)

Finds the layout template for a given page.

public static string? FindLayoutTemplateForPage(Page page)

Parameters

page Page

The page for which to find a layout template.

Returns

string

The name of the template, if found; otherwise null.

FindLayoutTemplateForPageItem(Page)

Finds the item layout template for a given page.

public static string? FindLayoutTemplateForPageItem(Page page)

Parameters

page Page

The page for which to find an item layout template.

Returns

string

The name of the template, if found; otherwise null.

FindLayoutTemplateForParagraph(Paragraph)

Finds the layout template for a given paragraph.

public static string? FindLayoutTemplateForParagraph(Paragraph paragraph)

Parameters

paragraph Paragraph

The paragraph for which to find a layout template..

Returns

string

The name of the template, if found; otherwise null.

FindLayoutTemplateForParagraph(Paragraph, Area, Layout)

Finds the layout template for a given paragraph. Use this when you need to render a paragraph on a different area (global paragraphs).

public static string? FindLayoutTemplateForParagraph(Paragraph paragraph, Area area, Layout layout)

Parameters

paragraph Paragraph

The paragraph for which to find a layout template.

area Area

The area where the paragraph will be rendered.

layout Layout

The layout.

Returns

string

The name of the template, if found; otherwise null.

FindLayoutTemplateForParagraphItem(Paragraph)

Finds the item layout template for a given paragraph.

public static string? FindLayoutTemplateForParagraphItem(Paragraph paragraph)

Parameters

paragraph Paragraph

The paragraph for which to find an item layout template.

Returns

string

The name of the template, if found; otherwise null.

FindLayoutTemplateForParagraphItem(Paragraph, Area, Layout)

Finds the item layout template for a given paragraph. Use this when you need to render a paragraph item on a different area (global paragraphs).

public static string? FindLayoutTemplateForParagraphItem(Paragraph paragraph, Area area, Layout layout)

Parameters

paragraph Paragraph

The paragraph for which to find an item layout template.

area Area

The area where the paragraph item will be rendered.

layout Layout

The layout.

Returns

string

The name of the template, if found; otherwise null.

GetItemLayoutTemplates(string, string)

Gets the collection of FileInfo of item layout templates.

public static IEnumerable<FileInfo> GetItemLayoutTemplates(string path, string itemType)

Parameters

path string

Relative path to the layout template.

itemType string

The item type.

Returns

IEnumerable<FileInfo>

The IEnumerable<T>.

LayoutTemplateExists(string, string)

Determines whether specified layout template file exists on disk.

public static bool LayoutTemplateExists(string path, string template)

Parameters

path string

Relative path to the layout template.

template string

The name or path of the template to look for.

Returns

bool

Value indicating whether specified layout template file exists on disk.

To top