Most data pipelines need some kind of configuration - be it the Id to filter for, a sort-order to change etc. which can change on the fly. You could code this in Razor, but we believe the correct way is to do this by configuration. There are various benefits in this approach - from safety to performance (we can optimize the pipelines) and more.
Because of this, each pipeline will parse the values specified through a property provider called the ConfigurationProvider. This in turn will check if it recognizes any placeholders (recursively) and try to resolve them.
- EntityId = "[QueryString:Id]" on a page /Details.aspx?id=25 will be resolved to EntityId = "25"
- EntityId = "[QueryString:Id]" on a page /Details.aspx?id=25,573,22 will be resolved to EntityId = "25,573,22"
- EntityId = "[QueryString:Id]" on a page /Details.aspx will be resolved to EntityId = ""
- EntityId = "[QueryString:Id|[AppSettings:DefaultId]]" on /Details.aspx will be resolved to the EntityId = "42" // the predefined ID in App-Settings
- EntityId = "2939,[QueryString:Id]" on the page /Details.aspx?id=25 would be resolved EntityId = "2939,25"
Property Providers Available in 2SexyContent 6.0
- App - system-values for the app, like Path, ...,
- AppSettings - properties vary because each app can have different settings
- AppResources - note that it is available, but you shouldn't use this, since it shouldn't be used for settings!
- QueryString - properties vary based on URL-Parameters after the ?
- Form (todo)
- Server (todo)
- Module (todo) - properties listed in the DNN Wiki
- User (todo) - properties listed in the DNN Wiki
- Tab (Page) (todo) - properties listed in the DNN Wiki
In general you can insert these token-like placeholder anywhere in the string-value. The following would all be valid:
Each placeholder is built using the following possibilities
- [Source:Key] - the required components - like [Module:ModuleId]
- [Source:Key|Format] - .net format string - this is mainly used for tokens inside templates, not usually for Configuration Injection
- [Source:Key|Fallback] - what to use if nothing found - [QueryString:Id|0] or [QueryString:Id|[QueryString:AppId]]
- Fallback can be done multiple times, like