refactor(templates): remove ctxData from tmpl files, use ctx.RootData instead (#37567)
Sub-templates have direct access to `ctx.RootData` (the root data map), so there is no need for callers to explicitly pass it as `ctxData` via `dict`. Also fix #37569 by the way --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
{{template "base/head" .ctxData}}
|
||||
<div role="main" aria-label="{{.ctxData.Title}}" class="page-content {{.pageClass}}">
|
||||
{{template "base/head" ctx.RootData}}
|
||||
<div role="main" aria-label="{{ctx.RootData.Title}}" class="page-content {{.pageClass}}">
|
||||
<div class="ui container flex-container">
|
||||
{{template "user/settings/navbar" .ctxData}}
|
||||
{{template "user/settings/navbar" ctx.RootData}}
|
||||
<div class="flex-container-main">
|
||||
{{template "base/alert" .ctxData}}
|
||||
{{template "base/alert" ctx.RootData}}
|
||||
{{/* block: user-setting-content */}}
|
||||
|
||||
{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
|
||||
|
||||
Reference in New Issue
Block a user