Table of Contents
AssignDataModel

Description: Assigns the data model for razor, this makes the template easier to build. Assigns the data model for Razor, making the template easier to build by populating various data properties like articleData, appTheme, moduleData, etc., from the SimplisityRazor model.

Signature
public string AssignDataModel(SimplisityRazor sModel)
Example
@AssignDataModel(sModel)
ChatGPT

Description: Renders a button to open a ChatGPT modal for generating text. Requires a ChatGPT API key in the global settings. The generated text will populate the field specified by 'textId'.

Signature
public IEncodedString ChatGPT(string textId, string sourceTextId = "")
Example
@ChatGPT(textId, sourceTextId)
CheckBoxRowIsHidden

Description: Creates a checkbox for the IsHidden property of a row. Creates a checkbox for the 'IsHidden' property of a row, allowing a row to be marked as hidden.

Signature
public IEncodedString CheckBoxRowIsHidden(SimplisityInfo rowData)
Example
@CheckBoxRowIsHidden(rowData)
DeepL

Description: Renders a button to open a DeepL translation modal. Requires a DeepL API key in the global settings and more than one portal language to be enabled. The translated text will populate the field specified by 'textId'.

Signature
public IEncodedString DeepL(string textId, string sourceTextId = "", string cultureCode = "")
Example
@DeepL(textId, sourceTextId, cultureCode)
RowKey

Description: A row MUST have a rowkey to be saved to the DB. This generates the rowkey. Generates the necessary hidden fields for a row's unique key ('rowkey' and 'rowkeylang') and a unique entity ID ('eid'). A row MUST have a rowkey to be saved to the database.

Signature
public IEncodedString RowKey(SimplisityInfo info)
Example
@RowKey(info)
StylePadding

Description: Standardized method and names to craete top,bottom,left,right padding on an element. Allows potion adjustment from module settings without change CSS files. field Id: leftpadding,rightpadding,toppadding,bottompadding Generates an inline CSS padding style string based on module settings. It reads 'leftpadding', 'rightpadding', 'toppadding', and 'bottompadding' settings and creates corresponding CSS properties.

Signature
public string StylePadding()
Example
@StylePadding()
TextBoxRowTitle

Description: Creates a textbox for the title, using a standard xpath. Creates a standard textbox for a row's title using the XPath 'genxml/lang/genxml/textbox/title'.

Signature
public IEncodedString TextBoxRowTitle(SimplisityInfo rowData)
Example
@TextBoxRowTitle(rowData)