AssignDataModel
Description: Assigns the data model for Razor, making the template easier to build by populating various data properties like appTheme, moduleData, portalData, etc., from the SimplisityRazor model.
Signaturepublic string AssignDataModel(SimplisityRazor sModel)
Example
@{ AssignDataModel(Model); }
DelayFormButton
Description: Renders a form submission button that appears after a specified delay. This is a security measure to help prevent automated bot submissions. It renders a specified Razor template for the button's appearance.
Signaturepublic IEncodedString DelayFormButton(SimplisityRazor sModel, string spost, int millisec = 1200, string template = "DelayFormButton.cshtml")
Example
@DelayFormButton(Model, "#postbuttonwrapper", 2000)
ResourceKey
Description: Gets a localized resource string. It searches through a list of resource paths and file keys (including 'RocketForms' and theme-specific resx files) to find the requested key.
Signaturepublic string ResourceKey(AppThemeLimpet appTheme, String resourceKey, String lang = "", String resourceExtension = "Text")
Example
@ResourceKey(appTheme, "submitbutton")
StylePadding
Description: Generates an inline CSS padding style string based on module settings. It reads 'leftpadding', 'rightpadding', 'toppadding', and 'bottompadding' settings and creates corresponding CSS properties.
Signaturepublic string StylePadding()
Example
<div style="@StylePadding()">...</div>