From 6faad68059d5b4fe678f3464497199c0d720c80e Mon Sep 17 00:00:00 2001 From: andre Date: Fri, 25 Sep 2026 17:53:15 +0100 Subject: [PATCH] feat(backoffice): breadcrumbs no layout partilhado (fecha 6.7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit includes/header.php passa a renderizar Painel > $page_title por omissão em qualquer página que não seja o próprio painel — cobre as 34 páginas do backoffice de uma vez, sem editar cada uma. Uma página que queira um trilho mais rico define $breadcrumbs = [['label'=>..., 'url'=>...], ..., ['label'=>'Atual']] antes de incluir o header (o último item, sem 'url', é a página corrente). Co-Authored-By: Claude Sonnet 5 --- includes/header.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/includes/header.php b/includes/header.php index 2c9e462..a7634ee 100644 --- a/includes/header.php +++ b/includes/header.php @@ -276,6 +276,29 @@ $app_name = defined('APP_NAME') ? APP_NAME : 'FitMe 3070'; +'Equipa','url'=>base_url('views/admin/team/index.php')], ['label'=>'Editar']] +// (last item has no 'url' — it's the current page) for a full trail; with +// nothing set, this falls back to Painel > $page_title, which is right for +// every top-level listing page and wrong for nothing. +$breadcrumbs = $breadcrumbs ?? ( + $page_title !== 'Painel' + ? [['label' => 'Painel', 'url' => base_url('views/admin/dashboard.php')], ['label' => $page_title]] + : [] +); +if ($breadcrumbs): ?> + +