Do the navbar properly
authorKarl O. Pinc <kop@karlpinc.com>
Sun, 28 Jul 2024 19:37:36 +0000 (14:37 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Sun, 28 Jul 2024 19:37:36 +0000 (14:37 -0500)
src/pgwui_menu/templates/menu.mak

index 326513508c896d2bd7b93bb1472b80214a9878c0..f1bdc474866ba6cd65239a918bef507a6dbe7d34 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <%doc>
-  Copyright (C) 2020 The Meme Factory, Inc.  http://www.karlpinc.com/
+  Copyright (C) 2020, 2024 The Meme Factory, Inc.  http://www.karlpinc.com/
  
      This file is part of PGWUI_Menu.
     
     from pgwui_common.path import asset_abspath
 
     base_mak = asset_abspath('pgwui_common:templates/base.mak')
+    lib_mak = asset_abspath('pgwui_common:templates/lib.mak')
 %>
 
 <%inherit file="${base_mak}" />
+<%namespace name="lib" file="${lib_mak}" />
 <%block name="title">${pgwui_menu['menu_label']}</%block>
 <%block name="stylesheet_links">
   ${parent.stylesheet_links()}
 </%block>
 
 <%def name="navbar_content()">
-  ${parent.navbar_content()}
-  % if 'pgwui_logout' in pgwui['urls']:
-    | <a href="${pgwui['urls']['pgwui_logout']}">Logout</a>
-  % endif
+  <%parent:navbar_content>
+    <%lib:have_navbar_logout>
+      ${caller.body()}
+    </%lib:have_navbar_logout>
+  </%parent:navbar_content>
 </%def>
 
 <ul>