diff --git a/winixd/templates/templates.cpp b/winixd/templates/templates.cpp index e36971b..7fd853d 100644 --- a/winixd/templates/templates.cpp +++ b/winixd/templates/templates.cpp @@ -644,6 +644,7 @@ void Templates::CreateFunctions() ezc_functions.Insert("winix_locale_tab_id", winix_locale_tab_id); ezc_functions.Insert("winix_locale_tab_name", winix_locale_tab_name); ezc_functions.Insert("winix_is_htmx_request", winix_is_htmx_request); + ezc_functions.Insert("winix_frame_is", winix_frame_is); ezc_functions.Insert("lang", lang); diff --git a/winixd/templates/templates.h b/winixd/templates/templates.h index 0eda625..ef9e293 100644 --- a/winixd/templates/templates.h +++ b/winixd/templates/templates.h @@ -537,6 +537,7 @@ namespace TemplatesFunctions void winix_locale_tab_id(Info & i); void winix_locale_tab_name(Info & i); void winix_is_htmx_request(Info & i); + void winix_frame_is(Info & i); void lang(Info & i); // defined in winix.cpp - MOVE ME to a better place diff --git a/winixd/templates/winix.cpp b/winixd/templates/winix.cpp index fcaf57b..baf7141 100644 --- a/winixd/templates/winix.cpp +++ b/winixd/templates/winix.cpp @@ -381,6 +381,12 @@ void winix_is_htmx_request(Info & i) } +void winix_frame_is(Info & i) +{ + i.res = cur->request->frame == i.par; +} + + void lang(Info & i) { i.res = !i.par.empty();