refactor: rename DTree to DValue
This commit is contained in:
@@ -6,7 +6,7 @@ COMPONENT(Request& context)
|
||||
if(nav_class == "" && (context.cfg.get_by_path("theme/key").to_string() == "portal-dark" || context.cfg.get_by_path("theme/key").to_string() == "dark" || context.cfg.get_by_path("theme/key").to_string() == "retro-gaming"))
|
||||
nav_class = "nav-shell";
|
||||
|
||||
DTree account_props;
|
||||
DValue account_props;
|
||||
if(context.props["account_wrapper_class"].to_string() != "")
|
||||
account_props["wrapper_class"] = context.props["account_wrapper_class"];
|
||||
if(context.props["links_wrapper_class"].to_string() != "")
|
||||
@@ -18,7 +18,7 @@ COMPONENT(Request& context)
|
||||
<nav<?: nav_class != "" ? " class=\"" + html_escape(nav_class) + "\"" : "" ?>>
|
||||
<div class="nav-menu">
|
||||
<a href="<?= app_link("", context) ?>"><?= context.cfg.get_by_path("site/name").to_string() ?></a>
|
||||
<? context.cfg.get_by_path("menu").each([&](DTree menu_item, String menu_key) {
|
||||
<? context.cfg.get_by_path("menu").each([&](DValue menu_item, String menu_key) {
|
||||
if(menu_item["hidden"].to_string() == "1")
|
||||
return;
|
||||
String href = menu_item["external"].to_string() != "" ? "/" + menu_key : app_link(menu_key, context);
|
||||
|
||||
Reference in New Issue
Block a user