@inherits Custom.Hybrid.Razor14
@using ToSic.Razor.Blade;
@using System.Linq;
<!-- unimportant stuff, hidden -->
SQL from an App.Query The easiest way to... <!-- unimportant stuff, hidden -->
<div class="row">
<div class="col-lg-7">
<h2>Current Portal</h2>
<div>In this example PortalId uses the preset <code>[Portal:PortalId]</code></div>
@{
// Get the query and ask for the "Default" results as a dynamic List
var query = App.Query["DnnFilesFromSql"];
var files = AsList(query);
}
<ul>
@foreach(var file in files) {
<li>
@file.FileName
</li>
}
</ul>
</div>
<div class="col-lg-5">
@fancybox.PreviewWithLightbox(App.Path + "/data/assets/sql-query-dnn-files.png", width, height, "float-left", label: "Query Tree")
@fancybox.PreviewWithLightbox(App.Path + "/data/assets/sql-query-configuration.png", width, height, "float-left", label: "Query Configuration with Params and Test-Values")
@fancybox.PreviewWithLightbox(App.Path + "/data/assets/sql-query-select-statement.png", width, height, "float-left", label: "SQL Query using Params")
</div>
</div>
<!-- unimportant stuff, hidden -->