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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user