Table of Contents

Interface ITemplateEngine

Namespace
ToSic.Sxc.Services.Template
Assembly
ToSic.Sxc.dll

Engine which parses a template containing placeholders and replaces them with values from sources.

[PublicApi]
public interface ITemplateEngine

Remarks

Released in 18.03

Methods

GetSources(NoParamOrder, int)

Get a list of underlying sources, mainly for debugging.

IEnumerable<ILookUp> GetSources(NoParamOrder protector = default, int depth = 0)

Parameters

protector NoParamOrder
depth int

Returns

IEnumerable<ILookUp>

Parse(string)

Basic Parse functionality. This is the variant without parameters, which should be used in basic cases and also for passing into function calls, like into CMS HTML Tweaks.

string Parse(string template)

Parameters

template string

Returns

string

Parse(string, NoParamOrder, bool, IEnumerable<ILookUp>)

string Parse(string template, NoParamOrder protector = default, bool allowHtml = false, IEnumerable<ILookUp> sources = null)

Parameters

template string
protector NoParamOrder
allowHtml bool
sources IEnumerable<ILookUp>

Returns

string