Class TemplateFile
- Namespace
- Dynamicweb.Rendering.Designer
- Assembly
- Dynamicweb.dll
A representation of a template file.
public class TemplateFile
- Inheritance
-
TemplateFile
- Inherited Members
Remarks
Only files of type .html, .htm, .xsl, .xslt. Icon files can be placed in same location with same name, but with extension of png, gif or jpg
Constructors
TemplateFile(FileInfo)
Initializes a new instance of the TemplateFile class.
public TemplateFile(FileInfo template)
Parameters
template
FileInfo- The template.
Properties
Description
Gets the description of the template file from @Paragraph.Description(the description).
public string Description { get; }
Property Value
- string
- The description value from the tag if present.
FileNameWithoutExtension
Gets the name of the template file with out extension.
public string FileNameWithoutExtension { get; }
Property Value
- string
- The name with out extension. I.e. Main if the layout file is /Designs/NameOfDesign/Main.html
FullName
Gets the absolute path to the template , i.e /Files/Templates/Designs/Design1/Paragraph/file.html
public string FullName { get; }
Property Value
Icon
Gets the icon of the layout - a .gif, .png or .jpg with same name and location as the html file.
public string Icon { get; }
Property Value
Location
Gets the absolute path to the template folder, i.e /Files/Templates/Designs/Design1/Paragraph/
public string Location { get; }
Property Value
Name
Gets the name of the template file, i.e. file.html
public string Name { get; }
Property Value
NameWithOutExtension
[Obsolete("User FileNameWithoutExtension instead.")]
public string NameWithOutExtension { get; }
Property Value
TemplateFileInfo
Gets a fileinfo object of the layout template
public FileInfo TemplateFileInfo { get; }
Property Value
TemplateName
Gets the relative path to the template , i.e /Designs/Design1/Paragraph/file.html
public string TemplateName { get; }
Property Value
Title
Gets the title of the template file from @Paragraph.Title(the title). Otherwise it returns the name of the template file.
public string Title { get; }
Property Value
- string
- The title value from the tag if present.
Methods
GetTemplateFiles(string)
Gets a collection of template files in specified directory.
public static TemplateFileCollection GetTemplateFiles(string path)
Parameters
path
string- Path to template files