Fix: update local _nav.html to use widget-driven nav
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m5s

The blog app's local templates/_types/post/_nav.html was shadowing
the shared version due to ChoiceLoader priority. Updated local copy
to use container_nav_widgets while keeping the blog-specific admin
cog link. Removed debug logging from context processor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-19 19:57:30 +00:00
parent f625c42118
commit 5c203cb99c
3 changed files with 4 additions and 12 deletions

View File

@@ -70,10 +70,6 @@ def register():
post_slug = (g.post_data.get("post") or {}).get("slug", "")
# Widget-driven container nav
import logging
_log = logging.getLogger("coop")
_log.warning("WIDGET DEBUG: %d nav widgets registered, post_id=%s slug=%s",
len(widgets.container_nav), db_post_id, post_slug)
container_nav_loaded = []
for w in widgets.container_nav:
try:
@@ -82,12 +78,9 @@ def register():
post_slug=post_slug,
)
has_data = any(v for v in wctx.values() if isinstance(v, list) and v)
_log.warning("WIDGET DEBUG: %s has_data=%s keys=%s", w.domain, has_data,
{k: len(v) if isinstance(v, list) else v for k, v in wctx.items()})
if has_data:
container_nav_loaded.append({"widget": w, "ctx": wctx})
except Exception as e:
_log.exception("WIDGET ERROR: %s: %s", w.domain, e)
except Exception:
ctx = {
**p_data,