App Resources
Every App has a Resources Entity. The fields available can be anything your App needs, so there is no pre-defined set of fields.
Edit/Configure App Resources
This is where you can find the App Resources
On 2 you can configure the fields you need, just like any other Entity:
On 3 you can set the values you need
Why would you use this?
Many templates may have special labels, intro-texts or buttons which would benefit from simple editing and from multi-language capabilities. This is what the App Resources are for.
Use in C# Code (Razor / WebAPI)
In 2sxc 12.04+ you should use the new Resources
Stack object which merges resources from different sources incl. the App Resources.
See Resources C# Docs.
In previous version you can access it on the App.Resources
Dynamic Entity, like App.Resources.Introduction
. Check out the App API docs
Use in Token Templates
Tokens templates are much more limited, but you can access these values using [App:Resources:...]
- for example [App:Resources:Introduction]
.
The new v12 Resources-Stack is not available in tokens. If you think you need it, please post an issue on github.
Don't use in VisualQuery
You could also access these properties in VisualQuery, using tokens like [App:Resources:Introduction]
- but this is not recommended, as you should not use Resources for this. Use App Settings instead.
Don't Use Resources for Settings
Resources should only be used for labels, logos, introduction-texts and similar. For Settings always use App Settings.
History
- Introduced in 2sxc 6.0
- Extendend The Content App to have multi-language App Resources and Settings 2sxc v11
- Created the global Resources in v12.04
- Placed the global Resources in the Primary App in v13.0