ITemplateEngine
- Namespace: SuCoS.TemplateEngine
- Source File: ITemplateEngine.cs
Interface for all template engines.
Public Methods
Initialize
void Initialize(Site site)
Initializes the template engine for the given site.
Parameters:
site(Site): The site context.
PreCompileTheme
void PreCompileTheme(string themePath)
Precompiles all templates from the theme path.
Parameters:
themePath(string): The absolute theme path.
Render
string Render(string templatePathOrInlineKey, ISite site, IPage page, int? counter = null)
Renders a template identified by key/path.
Parameters:
templatePathOrInlineKey(string): Template key or path.site(ISite): The site context.page(IPage): The page context.counter(int?): Optional counter for resource naming scenarios. (Default:null)
Returns: string
- The rendered template output.
RenderInline
string RenderInline(string templateBody, ISite site, IPage page)
Renders an inline template body.
Parameters:
templateBody(string): Inline template content.site(ISite): The site context.page(IPage): The page context.
Returns: string
- The rendered template output.