11@inherits Custom .Hybrid .Razor14
22@using ToSic .Razor .Blade ;
3- @* !
4- Tut.Tabs=file:.././230-query-parameters.js
5- !*@
3+ @{ /* ! Tut.Tabs=file:.././230-query-parameters.js,ViewConfig */
4+ var viewCnf = DynamicModel .Tutorial .ViewConfig ;
5+ var Data = viewCnf .Query (query : " AuthorsWithBooks" ) as ToSic .Eav .DataSource .IDataSource ;
6+ /* !*/ }
67@* Make sure anonymous users have the 2sxc JS API *@
78@Kit.Page.Activate( "2sxc.JsCore")
9+ @{ var btnPrefix = " mod-" + CmsContext .Module .Id ; }
810
9- <
button id =
" [email protected] " type =
" button" class =
" btn btn-primary" >Get Query with parameters (object)</
button >
10- <
button id =
" [email protected] " type =
" button" class =
" btn btn-primary" >Get Query with parameters (string)</
button >
11- <
button id =
" [email protected] " type =
" button" class =
" btn btn-primary" >Get Query Stream with parameters</
button >
12- <
button id =
" [email protected] " type =
" button" class =
" btn btn-primary" >Get Query Streams with parameters</
button >
11+ <button id =" @btnPrefix-object" type =" button" class =" btn btn-primary" >
12+ Get Query with parameters (object)
13+ </button >
14+ <button id =" @btnPrefix-string" type =" button" class =" btn btn-primary" >
15+ Get Query with parameters (string)
16+ </button >
17+ <button id =" @btnPrefix-stream-params" type =" button" class =" btn btn-primary" >
18+ Get Query Stream with parameters
19+ </button >
20+ <button id =" @btnPrefix-streams-params" type =" button" class =" btn btn-primary" >
21+ Get Query Streams with parameters
22+ </button >
1323
14- @* This tutorial uses turnOn, see turnOn tutorials *@
24+ @* This tutorial uses turnOn, see turnOn tutorials *@
1525@{
16- var demoAuthorId = AsList ( Data [" RandomAuthor" ]) .FirstOrDefault ().EntityId ;
26+ var demoAuthorId = Data [" RandomAuthor" ]. List .FirstOrDefault ().EntityId ;
1727 var data = new {
1828 moduleId = CmsContext .Module .Id ,
1929 demoAuthorId = demoAuthorId ,
@@ -22,4 +32,4 @@ Tut.Tabs=file:.././230-query-parameters.js
2232
2333@Kit.Page.TurnOn( "window.tutQueryParameters.init()", data: data)
2434
25- <script src =" @CmsContext.View. Path/230-query-parameters.js" ></script >
35+ <script src =" @App. Path/js /230-query-parameters.js" ></script >
0 commit comments