Table of Contents
AssignDataModel

Description: Assigns the data model for Razor, making the template easier to build by populating various data properties like appTheme, moduleData, articleData, 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)
DateJsApiCall

Description: Dates the js API call. JS function: doDateSearchReload cmd:remote_publiclist Renders the JavaScript function 'doDateSearchReload' which calls the remote API to refresh the list of articles based on a selected date range.

Signature
public IEncodedString DateJsApiCall(ModuleContentLimpet moduleData, string sreturn, SessionParams sessionParams, string templateName = "articlelist.cshtml")
Example
@DateJsApiCall(moduleData, sreturn, sessionParams, templateName)
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)
DetailUrl

Description: Builds the Detail URL. Builds a friendly URL to a detail page for a specific article, including the article title and ID for SEO and routing.

Signature
public IEncodedString DetailUrl(int detailpageid, ArticleLimpet articleData, string[] urlparams = null)
Example
@DetailUrl(detailpageid, articleData, urlparams)
Signature
public IEncodedString DetailUrl(int detailpageid, ArticleLimpet articleData, CategoryLimpet categoryData, string[] urlparams = null)
Example
@DetailUrl(detailpageid, articleData, categoryData, urlparams)
FilterCheckBox

Description: Filters the CheckBox on the "Filters" website view. Renders a filter checkbox for the public-facing view. When changed, it updates a session field and triggers a JavaScript function to refresh the article list.

Signature
public IEncodedString FilterCheckBox(string checkboxId, string textName, string sreturn, bool value, string cssClass = "", string attributes = "")
Example
@FilterCheckBox(checkboxId, textName, sreturn, value, cssClass, attributes)
FilterClearButton

Description: Renders a button that clears all active filters by unchecking all filter checkboxes and refreshing the article list.

Signature
public IEncodedString FilterClearButton(string textName, string sreturn)
Example
@FilterClearButton(textName, sreturn)
FilterGroupCheckBox

Description: CheckBox for a group filter. (Used in the ThemeSettings for selecting which group filters to use.) Renders a checkbox for a property group filter, typically used in theme settings to enable or disable filter groups.

Signature
public IEncodedString FilterGroupCheckBox(SimplisityInfo info, string groupId, string textName)
Example
@FilterGroupCheckBox(info, groupId, textName)
Signature
public IEncodedString FilterGroupCheckBox(SimplisityInfo info, CatalogSettingsLimpet catalogSettings)
Example
@FilterGroupCheckBox(info, catalogSettings)
FilterJsApiCall

Description: Adds the JS for calling the filter API. JS:callArticleList() cmd:remote_publiclist Renders the JavaScript function 'callFilterArticleList' which calls the remote API to refresh the list of articles based on the current filter selections.

Signature
public IEncodedString FilterJsApiCall(ModuleContentLimpet moduleData, SessionParams sessionParams, string templateName = "articlelist.cshtml")
Example
@FilterJsApiCall(moduleData, sessionParams, templateName)
InterfaceNameResourceKey

Description: Gets the interfaces name from the resource file. Gets the localized name for a RocketInterface from the resource files. It searches in the system's resources first, then the interface's template resources.

Signature
public IEncodedString InterfaceNameResourceKey(RocketInterface rocketInterface, SystemLimpet systemData, String lang = "", string resxFileName = "SideMenu")
Example
@InterfaceNameResourceKey(rocketInterface, systemData, lang, resxFileName)
ListUrl

Description: Builds the List URL. Builds a friendly URL to a list page, optionally including category information.

Signature
public IEncodedString ListUrl(int listpageid, CategoryLimpet categoryData, string[] urlparams = null)
Example
@ListUrl(listpageid, categoryData, urlparams)
Signature
public IEncodedString ListUrl(int listpageid, string[] urlparams = null)
Example
@ListUrl(listpageid, urlparams)
RssUrl

Description: Generates a URL for an RSS feed based on a command, date range, and optional SQL index.

Signature
public IEncodedString RssUrl(int portalId, string cmd, int yearDate, int monthDate, int numberOfMonths = 1, string sqlidx = "")
Example
@RssUrl(portalId, cmd, yearDate, monthDate, numberOfMonths, sqlidx)
TagButton

Description: Renders a clickable tag button. When clicked, it sets the 'rocketpropertyidtag' session field and refreshes the article list to show items with that tag.

Signature
public IEncodedString TagButton(int propertyid, string textName, SessionParams sessionParams, string displayClass = "rocket-tagbutton", string selectedClass = "rocket-tagbuttonOn")
Example
@TagButton(propertyid, textName, sessionParams, displayClass, selectedClass)
TagButtonClear

Description: Tags the button. Renders a button to clear the active tag filter. It is initially hidden and appears when a tag is selected.

Signature
public IEncodedString TagButtonClear(string textName, SessionParams sessionParams, string displayClass = "rocket-tagbutton")
Example
@TagButtonClear(textName, sessionParams, displayClass)
TagJsApiCall

Description: Adds the JS for calling the filter API. JS:callTagArticleList() cmd:remote_publiclist

Signature
public IEncodedString TagJsApiCall(ModuleContentLimpet moduleData, string sreturn, SessionParams sessionParams, string templateName = "articlelist.cshtml")
Example
@TagJsApiCall(moduleData, sreturn, sessionParams, templateName)
Signature
public IEncodedString TagJsApiCall(ModuleContentLimpet moduleData, string sreturn, SessionParams sessionParams, string displayClass, string selectedClass, string templateName)
Example
@TagJsApiCall(moduleData, sreturn, sessionParams, displayClass, selectedClass, templateName)
TextBoxMoney

Description: Renders a textbox for currency input. The value is formatted according to the portal's currency settings.

Signature
public IEncodedString TextBoxMoney(int portalId, string systemKey, string cultureCode, SimplisityInfo info, String xpath, String attributes = "", String defaultValue = "", bool localized = false, int row = 0, string listname = "", string type = "text")
Example
@TextBoxMoney(portalId, systemKey, cultureCode, info, xpath, attributes, defaultValue, localized, row, listname, type)