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
pagePageThe 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
pagePageThe 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
paragraphParagraphThe 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
paragraphParagraphThe paragraph for which to find a layout template.
areaAreaThe area where the paragraph will be rendered.
layoutLayoutThe 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
paragraphParagraphThe 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
paragraphParagraphThe paragraph for which to find an item layout template.
areaAreaThe area where the paragraph item will be rendered.
layoutLayoutThe 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
Returns
LayoutTemplateExists(string, string)
Determines whether specified layout template file exists on disk.
public static bool LayoutTemplateExists(string path, string template)
Parameters
pathstringRelative path to the layout template.
templatestringThe name or path of the template to look for.
Returns
- bool
Value indicating whether specified layout template file exists on disk.