refactor: rename DTree to DValue

This commit is contained in:
udo
2026-06-12 11:05:52 +00:00
parent 941f5aea08
commit 7066da3cde
157 changed files with 1203 additions and 1074 deletions
@@ -5,10 +5,10 @@ COMPONENT(Request& context)
String main_html = context.call["fragments"]["main"].to_string();
String current_path = context.call["route"]["l_path"].to_string();
DTree global_props;
DValue global_props;
global_props["cookie_consent"].set_bool(false);
DTree account_props;
DValue account_props;
account_props["wrapper_class"] = "admin-account-card";
account_props["links_wrapper_class"] = "admin-account-links";
account_props["name_class"] = "admin-account-name";
@@ -28,7 +28,7 @@ COMPONENT(Request& context)
<img class="admin-nav-logo-img" src="<?= app_asset_url("themes/localfirst/img/local_first_logo.png", context) ?>" alt="<?= context.cfg.get_by_path("site/name").to_string() ?>" />
</a>
</div>
<? 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;
bool active = menu_key != "" && (current_path == menu_key || current_path.rfind(menu_key + "/", 0) == 0);