I think I need to change the documentation format
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
#load "lib/app.uce"
|
||||
|
||||
RENDER(Request& context)
|
||||
#load "lib/app.uce"
|
||||
|
||||
RENDER(Request& context)
|
||||
{
|
||||
starter_boot(context);
|
||||
app_init(context);
|
||||
|
||||
DTree resolved = starter_resolve_view(context);
|
||||
DTree resolved = app_resolve_view(context);
|
||||
|
||||
ob_start();
|
||||
if(resolved["file"].to_string() != "")
|
||||
{
|
||||
if(resolved["param"].to_string() != "")
|
||||
context.var["starter"]["route"]["param"] = resolved["param"];
|
||||
context.var["app"]["route"]["param"] = resolved["param"];
|
||||
unit_render(resolved["file"].to_string(), context);
|
||||
}
|
||||
else
|
||||
{
|
||||
starter_not_found("The requested page does not exist.", context);
|
||||
app_not_found("The requested page does not exist.", context);
|
||||
<>
|
||||
<section class="card">
|
||||
<h1>404 Not Found</h1>
|
||||
<p><?= context.var["starter"]["error"].to_string() ?></p>
|
||||
<p><?= context.var["app"]["error"].to_string() ?></p>
|
||||
</section>
|
||||
</>
|
||||
}
|
||||
String main_html = ob_get_close();
|
||||
context.var["starter"]["fragments"]["main"] = main_html;
|
||||
starter_render_page(context);
|
||||
context.var["app"]["fragments"]["main"] = main_html;
|
||||
app_render_page(context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user