Class LayoutTemplateLocator
- Namespace
- Dynamicweb.Content.Layouts
- Assembly
- Dynamicweb.dll
Static methods for locating the appropiate layout template.
- Inheritance
-
Layout
Template Locator
- Inherited Members
Methods
FindLayoutTemplateForPage(Page)
Finds the layout template for a given page.
Parameters
page
PageThe 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.
Parameters
page
PageThe 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.
Parameters
paragraph
ParagraphThe 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).
Parameters
paragraph
ParagraphThe paragraph for which to find a layout template.
area
AreaThe area where the paragraph will be rendered.
layout
LayoutThe layout.
Returns
- string
The name of the template, if found; otherwise null.
FindLayoutTemplateForParagraphItem(Paragraph)
Finds the item layout template for a given paragraph.
Parameters
paragraph
ParagraphThe 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
ParagraphThe paragraph for which to find an item layout template.
area
AreaThe area where the paragraph item will be rendered.
layout
LayoutThe layout.
Returns
- string
The name of the template, if found; otherwise null.
GetItemLayoutTemplates(string, string)
Gets the collection of File
Parameters
Returns
LayoutTemplateExists(string, string)
Determines whether specified layout template file exists on disk.
Parameters
path
stringRelative path to the layout template.
template
stringThe name or path of the template to look for.
Returns
- bool
Value indicating whether specified layout template file exists on disk.