Switch to Typed (2sxc 16+) Selected: Dynamic (Razor14 or below)
Requirements
Use Dynamic DataSources in Visual Query
The following query will simply combine the two DataSources. The first will provide the authors. The second will apply the KeepOdd filters.
⬇️ Result | Source ➡️
Data in the Query (2)
- Terry (ID: 5339)
- Ed (ID: 5349)
DataSources which have [Configuration]
attributes can also support full visual configuration. The system looks for a content type with the same name as the DataSource + Configuration. In this case, it's looking for a Content Type WithConfigConfiguration
.
⬇️ Result | Source ➡️
Data in the Query (7)
- Hello from WithConfig #1 - Favorite Color: burgundy
- Hello from WithConfig #2 - Favorite Color: burgundy
- Hello from WithConfig #3 - Favorite Color: burgundy
- Hello from WithConfig #4 - Favorite Color: burgundy
- Hello from WithConfig #5 - Favorite Color: burgundy
- Hello from WithConfig #6 - Favorite Color: burgundy
- Hello from WithConfig #7 - Favorite Color: burgundy
Many aspects such as the Icon, Name etc. have automatic defaults. But you can configure them as you need using the [VisualQuery]
attribute.
⬇️ Result | Source ➡️
Data in the Query (1)
The data coming out of this DataSource is not important for the demo here. What's important is how the DataSource is customized to have specific properties in the VisualQuery.
To Customizations the VisualQuery, you can either use the VisualQueryCustomized.cs file. Look at the file for more information about VisualQuery.