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.

[InternalApi_DoNotUse_MayChangeWithoutNotice("Still Beta in v17.08")]
public interface ITemplateEngine

Remarks

New / beta in v17.08

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, eg. 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