Refactor MenuTree page and PagesMenuWidget: Removed the view property from MenuTree, updated header widget method to footer widget method, and eliminated the menu-tree Blade view file. Enhanced tree title handling in PagesMenuWidget by introducing a dedicated method for retrieving the title using localization.

This commit is contained in:
Ümit Tunç
2025-11-01 16:27:35 -03:00
parent ad20ba575a
commit 5fb74384ce
3 changed files with 3 additions and 17 deletions
@@ -15,14 +15,11 @@ class PagesMenuWidget extends BaseWidget
protected static int $maxDepth = 4;
protected ?string $treeTitle = null;
protected bool $enableTreeTitle = true;
public function mount(): void
public function getTreeTitle(): string
{
parent::mount();
$this->treeTitle = __('pages.menu_tree_title');
return __('pages.menu_tree_title');
}
protected function getTreeQuery(): Builder