Skip to main content
Version: 1.24

Core Tokens

These are standard, Plant an App-specific tokens.

Below is a list of all Core Tokens, along with a description of the information each one them binds. Further information regarding accepted Values, case Usage and usage Examples can be found directly in the Plant an App interface, under Configuration > Tokens > Core Tokens.

TokenDescription and information
HostBinds HostSettings information.
UserBinds information about current user or the user identified by the UserId, Username, or Email parameters.
PortalBinds information about the current portal.
BrowserBinds information about browser capabilities; please see here for more information.
MembershipBinds membership information; please see the Plant an App interface, under Configuration > Tokens > Core Tokens > Membership for information about how to enable Online Users.
ProfileBinds profile information for current user.
TabAccess information for current tab.
PageAccess information for current page.
ModuleBinds information for current module.
DateTimeBinds DateTime information; please see the Plant an App interface, under Configuration > Tokens > Core Tokens > DateTime for accepted syntax and examples.
TicksBinds ticks information. A single tick represents one hundred nanoseconds or one ten-millionth of a second. There are 10,000 ticks in a millisecond and 10 million ticks in a second. Please see here for more information.
RandomReturns a random value from specified comma separated list.
ApplicationBinds HttpApplicationState collection. Please see here for more information.
AppSettingsBinds to the "App Settings" ("<appSettings>") from the web.config file. Please see here for more information. This token needs to be enabled from security settings.
ServerVarsBinds the Request.ServerVariables collection from ASP.NET. Please see here for more information.
SessionBinds the HttpSessionState collection; please see here for more information.
CookieBinds HttpCookieCollection from ASP.NET. Allows to set, remove or retrieve values for cookies. Please see here for more information.
GetBinds Request.QueryString collection from ASP.NET. Please see here for more information.
QueryStringBinds Request.QueryString collection from ASP.NET. Please see here for more information.
PostBinds Request.Form collection from ASP.NET. Please see here for more information.
ParamsBinds the Request.Params collection (GET + POST + COOKIE parameters).
HttpContextItemsBinds HttpContext.Items property. Please see here for more information.
ContextItemsBinds the HttpContext.Items property - obsolete, use the "HttpContextItems" token instead (see above).
ContextBinds the HttpContext.Items property - obsolete, use the "HttpContextItems" token instead (see above).
SetSessionSets a value in the server session.
SetCookieSets a certain cookie value on the user's browser (along with its expiry).
SetProfileSets a value in the user's profile.
GetOrSessionBinds the Request.QueryString collection just like the Get token (see above) does; if the <Key> exists, it is saved it into the Session. Once the user leaves the page, this token will return the saved value from the Session.
GetOrCookieBinds the Request.QueryString collection just like the Get token (see above) does; if the <Key> exists, it is saved it into the browser's cookies. After the user leaves the page, this token will return the saved value from the cookies.
GetOrProfileBinds the Request.QueryString collection just like the Get token (see above) does; if the <Key> already exists, then it saves it into the User Profile under the property with the same name (must be created before the token is invoked). Once the user leaves the page, this token will return the values saved in the User Profile.
PostOrSessionBinds the Request.Form collection just like the Post token (see above) does; if the <Key> already exists, then it saves it into the Session. Once the user leaves the page, this token will return the saved value from the Session.
PostOrCookieBinds the Request.Form collection just like the Post token (see above) does; if the <Key> already exists, then it saves it into the browser's cookies. Once the user leaves the page, this token will return the saved value from the cookies.
PostOrProfileBinds the Request.Form collection just like the Post token (see above) does; if the <Key> already exists, then it saves it into the User Profile under the property with the same name (must be created before the token is invoked). Once the user leaves the page, this token will return the values saved in the User Profile.
ProfileOrInitBinds a Profile Property. If the profile property doesn't have a value, it will get updated to the value in the InitValue parameter (which can be a token itself).
SessionOrInitBinds a value from server session. If the server session doesn't contain a property with given <key>, it will get updated to the value in the InitValue parameter (which can be a token itself).
CookieOrInitBinds a value from the browser's cookies. If the browser cookies don't contain a property with given <key>, it will get updated to the value in the InitValue parameter (which can be a token itself).
UserRolesProvides access to membership for current user. Please see the Plant an App interface, under Configuration > Tokens > Core Tokens > UserRoles for accepted syntax.
URLProvides access to information about current URL. Accepted values: Domain, Port, DomainRoot, FullUrl, Relative, Referrer, PageName, PageNameWithoutExtension, Query, RewrittenQuery.
NavigateURLHelps build URLs from the page id or the page path. It will use the current URL Provider set in DNN, so the URLs will remain valid when the URL Provider changes. This is usually used inside href attributes of the HTML links.
MD5Returns the MD5 hash of any text.
Base64Encodes and decodes text in Base64.
EncodeSQLEncodes a text against SQL injection - obsolete, use the "SQL" token instead (see below).
SQLEncodes a text to protect against SQL injection attacks.
GUIDGenerates a new GUID (Globally Unique IDentifier, a 128-bit text string that allows unique application identification).
SiteAdminBinds information about administrator of current portal. Please see the Plant an App interface, under Configuration > Tokens > Core Tokens > SiteAdmin for accepted syntax.
PortalSettingsBinds PortalSettings information (gets settings as defined in the PortalSettings table).
HasRoleChecks that the current user has the given role.
DoesNotHaveRoleChecks that the current user does not have the given role.
ModuleOutputRenders the given module and embeds it where the token appears.
DoMathReturns the result of a mathematical expression. Accepts tokens as values. Please see the Plant an App interface, under Configuration > Tokens > Core Tokens > DoMath for accepted syntax.
IfCompares two variables and displays True if they are equal. This token is particularly useful in Condition fields.
StringEvaluates a string and replaces a predefined expression with the specified value(s).
DebugProvides access to debugging functions (dumps all parameters on screen).
FreeGeoIpProvides geographical information based on IP address. Accepts IPv4 and IPv6.
ResponseModifies the HTTP response to include headers and sets page title. Accepts tokens as values.
PluralizationHelper tokens for content pluralization (allows to define plural values for specific words or expressions).
LocalizationHelper tokens for content localization. Retrieves localization information from the browser. Accepted values: BrowserCultureCode, BrowserLanguageCode, BrowserCountryCode.
FileGets the link for a file that exists on the current portal.
FolderSynchronizes the folders on the current portal.