Fix: update local _nav.html to use widget-driven nav
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m5s
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user