AddCssLinkHeader
Description: Adds a CSS link to the page header. Generates a <link> tag to include a CSS file in the HTML header.
Signaturepublic IEncodedString AddCssLinkHeader(string cssRelPath)
Example
@AddCssLinkHeader(cssRelPath)
AddJsScriptHeader
Description: Generates a <script> tag to include a JavaScript file in the HTML header.
Signaturepublic IEncodedString AddJsScriptHeader(string jsRelPath)
Example
@AddJsScriptHeader(jsRelPath)
AddPreProcessData
Description: This method add the meta data to a specific cache list, so the we can use that data in the module code, before the razor template is rendered. This allows us to use the metadata token to add data selection information, like search filters and sort before we get the data from the DB. Adds a key-value pair to the pre-process data dictionary for later use. Adds metadata to a specific cache list before the Razor template is rendered. This allows module code to use this data (e.g., for database queries) before rendering. It requires a unique template name and module ID to create a specific cache key.
Signaturepublic IEncodedString AddPreProcessData(String metaKey, String metaValue,String templateFullName,String moduleId)
Example
@AddPreProcessData(metaKey, metaValue, templateFullName, moduleId)
AddProcessData
Description: Adds a key-value pair to the process data dictionary for later use. Adds metadata to the current rendering process. This data can be used by other tokens or within the same template. Returns an empty string.
Signaturepublic IEncodedString AddProcessData(String metaType, String metaValue)
Example
@AddProcessData(metaType, metaValue)
Signature
public IEncodedString AddProcessData(String metaKey, String metaValue, String templateFullName)
Example
@AddProcessData(metaKey, metaValue, templateFullName)
BreakOf
Description: Converts newline characters in a string to <br/> tags and HTML-encodes the content.
Signaturepublic IEncodedString BreakOf(SimplisityInfo info, String xpath)
Example
@BreakOf(info, xpath)
Signature
public IEncodedString BreakOf(IEncodedString strIn)
Example
@BreakOf(strIn)
Signature
public IEncodedString BreakOf(String strIn)
Example
@BreakOf(strIn)
CheckBox
Description: Renders a checkbox input field. Renders a single checkbox with a label, bound to a boolean value in a SimplisityInfo data model.
Signaturepublic IEncodedString CheckBox(SimplisityInfo info, String xpath,String text, String attributes = "", Boolean defaultValue = false, bool localized = false, int row = 0, string listname = "")
Example
@CheckBox(info, xpath, text, attributes, defaultValue, localized, row, listname)
CheckBoxList
Description: Renders a list of checkboxes from a dictionary or comma-separated strings. Each checkbox corresponds to a sub-node in the SimplisityInfo data model.
Signaturepublic IEncodedString CheckBoxList(SimplisityInfo info, string xpath, Dictionary<string, string> dataDictionary, string attributes = "", bool defaultValue = false, bool localized = false, int row = 0, string listname = "")
Example
@CheckBoxList(info, xpath, dataDictionary, attributes, defaultValue, localized, row, listname)
Signature
public IEncodedString CheckBoxList(SimplisityInfo info, string xpath, string datavalue, string datatext, string attributes = "", bool defaultValue = false, bool localized = false, int row = 0, string listname = "")
Example
@CheckBoxList(info, xpath, datavalue, datatext, attributes, defaultValue, localized, row, listname)
CheckBoxListOf
Description: Displays a formatted list (ul/li) of the selected items from a checkbox list.
Signaturepublic IEncodedString CheckBoxListOf(SimplisityInfo info, String xpath, String datavalue, String datatext, String attributes = "")
Example
@CheckBoxListOf(info, xpath, datavalue, datatext, attributes)
DateOf
Description: Formats a date from the data model or a DateTime object into a string using a specific culture and format.
Signaturepublic IEncodedString DateOf(SimplisityInfo info, String xpath, String cultureCode, String format = "d")
Example
@DateOf(info, xpath, cultureCode, format)
Signature
public IEncodedString DateOf(SimplisityInfo info, String xpath, bool displayEmpty, String cultureCode, String format = "d")
Example
@DateOf(info, xpath, displayEmpty, cultureCode, format)
Signature
public IEncodedString DateOf(DateTime dateTime, String cultureCode, String format = "g")
Example
@DateOf(dateTime, cultureCode, format)
DropDownList
Description: Renders a dropdown list from a key-value dictionary.
Signaturepublic IEncodedString DropDownList(SimplisityInfo info, String xpath, Dictionary<string,string> dataDictionary, String attributes = "", String defaultValue = "", bool localized = false, int row = 0, string listname = "")
Example
@DropDownList(info, xpath, dataDictionary, attributes, defaultValue, localized, row, listname)
Signature
public IEncodedString DropDownList(SimplisityInfo info, String xpath, String datavalue, String datatext, String attributes = "", String defaultValue = "", bool localized = false, int row = 0, string listname = "")
Example
@DropDownList(info, xpath, datavalue, datatext, attributes, defaultValue, localized, row, listname)
EmailOf
Description: Formats an email address from the data model as a 'mailto:' link.
Signaturepublic IEncodedString EmailOf(SimplisityInfo info, String xpath, string subject = "", string visibleText = "")
Example
@EmailOf(info, xpath, subject, visibleText)
FileSelectList
Description: Renders a dropdown list of files from a specified directory.
Signaturepublic IEncodedString FileSelectList(string selectedfilename, String mappathRootFolder, String attributes = "", Boolean allowEmpty = true)
Example
@FileSelectList(selectedfilename, mappathRootFolder, attributes, allowEmpty)
Signature
public IEncodedString FileSelectList(SimplisityInfo info, String xpath, String mappathRootFolder, String attributes = "", Boolean allowEmpty = true, bool localized = false)
Example
@FileSelectList(info, xpath, mappathRootFolder, attributes, allowEmpty, localized)
FolderSelectList
Description: Renders a dropdown list of subdirectories from a specified directory. Renders a dropdown list of subdirectories from a specified directory.
Signaturepublic IEncodedString FolderSelectList(SimplisityInfo info, String xpath, String mappathRootFolder, String attributes = "", Boolean allowEmpty = true, bool localized = false)
Example
@FolderSelectList(info, xpath, mappathRootFolder, attributes, allowEmpty, localized)
getChecked
public String getChecked(SimplisityInfo info, String xpath, Boolean defaultValue)
Example
@getChecked(info, xpath, defaultValue)
getIdFromXpath
public String getIdFromXpath(String xpath, int row, string listname)
Example
@getIdFromXpath(xpath, row, listname)
getUpdateAttr
public String getUpdateAttr(String xpath, String attributes, bool localized)
Example
@getUpdateAttr(xpath, attributes, localized)
HiddenField
Description: Renders a hidden input field. Renders a hidden input field bound to a SimplisityInfo data model.
Signaturepublic IEncodedString HiddenField(SimplisityInfo info, String xpath, String attributes = "", String defaultValue = "", bool localized = false, int row = 0, string listname = "")
Example
@HiddenField(info, xpath, attributes, defaultValue, localized, row, listname)
HtmlOf
Description: HTML-decodes a string from the data model or a direct string, rendering it as raw HTML.
Signaturepublic IEncodedString HtmlOf(SimplisityInfo info, String xpath)
Example
@HtmlOf(info, xpath)
Signature
public IEncodedString HtmlOf(String htmlString)
Example
@HtmlOf(htmlString)
RadioButtonList
Description: Renders a list of radio buttons from a dictionary or comma-separated strings, bound to a single field in the SimplisityInfo data model.
Signaturepublic IEncodedString RadioButtonList(SimplisityInfo info, string xpath, Dictionary<string, string> dataDictionary, string attributes = "", string defaultValue = "", string labelattributes = "", bool localized = false, int row = 0, string listname = "", string inputclass = "")
Example
@RadioButtonList(info, xpath, dataDictionary, attributes, defaultValue, labelattributes, localized, row, listname, inputclass)
Signature
public IEncodedString RadioButtonList(SimplisityInfo info, string xpath, string datavalue, string datatext, string attributes = "", string defaultValue = "",string labelattributes = "", bool localized = false, int row = 0, string listname = "", string inputclass = "")
Example
@RadioButtonList(info, xpath, datavalue, datatext, attributes, defaultValue, labelattributes, localized, row, listname, inputclass)
SecuritySiteKey
Description: This token is used to place a siteKey onto the return template. This key can then be checked by the client module to confirm a valid template has been returned.
Signaturepublic IEncodedString SecuritySiteKey(SessionParams sessionParams)
Example
@SecuritySiteKey(sessionParams)
SFields
Description: Renders a hidden input containing a base64 encoded string of a dictionary, used for secure field submission. Generates a 's-fields' HTML attribute containing a JSON object from a series of key-value pairs. This is used for client-side scripting with Simplisity.
Signaturepublic IEncodedString SFields(params string[] sFields)
Example
@SFields(sFields)
SortableListIndex
Description: outputs the index fields required for a list, so we can process a sort order correctly. Outputs hidden fields required for a sortable list to correctly process the sort order. This includes a unique item reference and the current row index.
Signaturepublic IEncodedString SortableListIndex(SimplisityInfo info, int row)
Example
@SortableListIndex(info, row)
Succinct
Description: Succinct shortens your text to a specified size, and then dots to the end. Shortens a string to a specified length and appends '...' if it was truncated.
Signaturepublic IEncodedString Succinct(string value, int size, bool showdots = true)
Example
@Succinct(value, size, showdots)
TextArea
Description: Renders a textarea field. Renders a textarea field bound to a SimplisityInfo data model.
Signaturepublic IEncodedString TextArea(SimplisityInfo info, String xpath, String attributes = "", String defaultValue = "", bool localized = false, int row = 0, string listname = "")
Example
@TextArea(info, xpath, attributes, defaultValue, localized, row, listname)
TextBox
Description: Renders a text input field. Renders a text input field bound to a SimplisityInfo data model.
Signaturepublic IEncodedString TextBox(SimplisityInfo info, String xpath, String attributes = "", String defaultValue = "", bool localized = false, int row = 0, string listname = "", string type = "text")
Example
@TextBox(info, xpath, attributes, defaultValue, localized, row, listname, type)
TextBoxDate
Description: Renders a date input field (type='date') bound to a SimplisityInfo data model. The value is formatted as 'yyyy-MM-dd'.
Signaturepublic IEncodedString TextBoxDate(SimplisityInfo info, String xpath, String attributes = "", String defaultValue = "", bool localized = false, int row = 0, string listname = "")
Example
@TextBoxDate(info, xpath, attributes, defaultValue, localized, row, listname)