2,299
edits
Changes
no edit summary
The '''System Variables '''setting on the [[Global Settings]] page will allow you to create and edit system-wide variables within your [[instance]]. These variables can then be referred to from anywhere within your [[SmartSimple]] copy by using the following syntax: : <span style="font -size="3: medium;">@system.''variable name''@</fontspan> '''Example:''' If you have created a System Variable named '''Tax Rate''' you would use:
@system.tax rate@
A global System Library can be accessed as system variables. The available values and functions can be found under System Variables on the [[Global Settings]] page. The syntax is:
: <span style="font-size: medium;">@system.library.''variable name''@</span>
'''<br class="Apple-interchange-newline">Example:'''
To return a list of languages from the global library, you would use:
=Accessing System Variables=
1. Click on the 9-square menu icon on the top right of your page. :: {{Icon-Menu}} 2. Under the heading '''Configuration, '''Example:select '''Global Settings. '''To return a list of languages from 3. Under the global librarysubheading '''System Configuration, you would use: @system '''click on the hyperlink labelled '''System Variables.library.language@ '''
==System 2==
For example, if on a [[Web Page View]] you have a button that you want to have a different value based on the [[Language|langid]] of the user.
* Create 2 [[System Variable]]s with :*:* Name: '''Open1''' Value: '''Open''':*:* Name: '''Open2''' Value: '''Ouvert'''
And refer to them on the [[Web Page View]] as follows
* <pre> <input type="button " value="@system2.Open@me.langid@@" onclick="doThis()"/>
</pre>
==Setting a System Variable==
*# Go to [[Global Settings]]*# Under the System Configuration heading, click on the hyperlink for System Variables.*# Click on the "New Variable" button and enter details::*#* '''Name''' will be the variable name referenced in the '''@system.''variable name''@''' syntax.:*#* '''Description''' is an optional narrative description.:*#* '''Value''' will be the value returned by the variable.
If the Value is a date, use the ''yyyy-mm-dd'' date format.
==See Also==
*#* [[Pandora - Update a System Variable]]*#* [[Root Company Variable]]s
[[Category:Global Settings]][[Category:Variables]]