Data available to all pages
We call common data to that data available in all pages. You can access and print this data using the following DotLiquid syntax:
For example, to print the name of the space, you can do the following:
You can use this within normal HTML code, for example:
Common Data
The following data is available in all pages. This means that you can use and print these values in any of the pages of the space website.
data.Business
Provides access to the details of your space, such as its name and contact details
data.User
Provides access to the details of the user logged in
data.Coworker
Provides access to the member details currently logged in
data.Wall
Provides access to the list of messages in the wall.
This is a list, if you want to cycle throught each of the items in it use the following code:
data.Languages
Provides access to the list of languages available in your account.
This is a list, if you want to cycle throught each of the items in it use the following code:
data.CustomTemplates
Provides access to the list of custom pages available for the currently selected language.
This is a list, if you want to cycle throught each of the items in it you can use the following code:
data.Resources
Provides access to the list of resources in the space. Only those resources marked as "Visible" are included in this list.
This is a list, if you want to cycle throught each of the items in it you can use some code like this:
Messages
Sometimes, Nexudus Spaces will generate messages to be displayed to the user. These messages can be informational, about an error or indicating that an operation was performed successfully.
You can use the following code to display messages to the user:
Other details
{{ data.Language }} #gets the code of the current language (en, es, fr, ...)
{{ data.UserIsLoggedIn }} #indicates if the user currently logged in
{{ data.Now }} #gets the current time of the server
{{ data.UtcNow }} #gets the current time of the server as UTC
{{ data.ShortDatePattern }} #gets the format for short dates in the current language
{{ data.ShortTimePattern }} #gets the format for short times in the current language
{{ data.Coworker.IsPayingMember }}
Comments
Please sign in to leave a comment.