Table of Contents

Class LayoutTemplateLocator

Namespace
Dynamicweb.Frontend
Assembly
Dynamicweb.dll
Static methods for locating the appropiate layout template location based on the current context.
[Obsolete("Use Dynamicweb.Content.Layouts.LayoutTemplateLocator instead.")]
public class LayoutTemplateLocator
Inheritance
LayoutTemplateLocator
Inherited Members

Methods

FindLayoutPhoneTemplateForPage(Page)

Finds the phone layout template for a given page.
public static string FindLayoutPhoneTemplateForPage(Page page)

Parameters

page Page
The page for which to find a phone layout template.

Returns

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

FindLayoutTabletTemplateForPage(Page)

Finds the tablet layout template for a given page.
public static string FindLayoutTabletTemplateForPage(Page page)

Parameters

page Page
The page for which to find a tablet layout template.

Returns

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

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.

GetLayoutFromName(Area, string)

Gets the Layout given the Area and the layout name.
public static Layout GetLayoutFromName(Area area, string layoutName)

Parameters

area Area
The area to which the layout are associated.
layoutName string
The name of the layout.

Returns

Layout
The Layout if one can be found; otherwise null.

GetLayoutNameForDevice(Page, DeviceType?)

Gets the name of the layout associated with the given Page and DeviceType.
public static string GetLayoutNameForDevice(Page page, DeviceType? device)

Parameters

page Page
The page for which to find the layout name.
device DeviceType?
The device type that the layout must match. If null is passed, the default layout is used.

Returns

string
The name of the found layout one can be found; otherwise null.

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