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
pagePage- 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
pagePage- 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
pagePage- 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
pagePage- 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
paragraphParagraph- 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
paragraphParagraph- The paragraph for which to find a layout template.
areaArea- The area where the paragraph will be rendered.
layoutLayout- 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
paragraphParagraph- 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
paragraphParagraph- The paragraph for which to find an item layout template.
areaArea- The area where the paragraph item will be rendered.
layoutLayout- The layout.
Returns
- string
- The name of the template, if found; otherwise null.
GetLayoutFromName(Area, string)
public static Layout GetLayoutFromName(Area area, string layoutName)
Parameters
Returns
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
pagePage- The page for which to find the layout name.
deviceDeviceType?- The device type that the layout must match. If
nullis 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
pathstring- Relative path to the layout template.
templatestring- The name or path of the template to look for.
Returns
- bool
- Value indicating whether specified layout template file exists on disk.