Switch to Strong-Typed (2sxc 17.06+) Selected: Typed (2sxc 16+) Switch to Dynamic (Razor14 or below)
Basic Example from App.Data
The easiest data to access comes from the current environment - like from the App or from DNN itself. The following example gets Persons
data from the App.Data.GetStream("Persons")
and just loops through them. This is similar to the example in the content tutorial, except that the data comes from the App.Data
instead of the current instance Data
.
⬇️ Result | Source ➡️
-
Douglas Adams
-
Terry Pratchett
-
Neil Gaiman
-
George Akerlof
- Raphael Müller (not an author)
-
Ed Hardy
Queries are pre-build for things like "get all authors and the books of the author in the URL" or similar (more). These are configured in the App administration. The query AuthorsWithBooks
(shown to the right) is used in this example. Below you'll see us first iterate through all the items in the Authors
Stream. If an author was clicked on (which places the author-id in the url), the query will also return the current Author in the Current
stream as well as the CurrentBooks
of that author.
⬇️ Result | Source ➡️
No author selected - click on an author above
View Configuration
This is how this view would be configured for this sample.
- Query: AuthorsWithBooksOqtane
No details yet for AuthorsWithBooksOqtane