Skip to content

Commit d4b694e

Browse files
[5.x] Fix editability of nav items without content reference (#11822)
* Display URL for nav items without titles * We already have handling for this in a computed value, but non-entry urls weren't getting through. * Add edit option to twirldown as well. --------- Co-authored-by: Jesse Leite <jesseleite@gmail.com>
1 parent 108a906 commit d4b694e

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

resources/js/components/navigation/View.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@
108108
v-if="isEntryBranch(branch)"
109109
:text="__('Edit Entry')"
110110
:redirect="branch.edit_url" />
111+
<dropdown-item
112+
:text="__('Edit nav item')"
113+
@click="editPage(branch, vm, vm.store)" />
111114
<dropdown-item
112115
v-if="depth < maxDepth"
113116
:text="__('Add child nav item')"

src/Structures/TreeBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected function transformTreeForController($tree)
101101
'handle' => $page->entry()->blueprint()->handle(),
102102
'title' => $page->entry()->blueprint()->title(),
103103
] : null,
104-
'url' => $referenceExists ? $page->url() : null,
104+
'url' => $page->url(),
105105
'edit_url' => $page->editUrl(),
106106
'can_delete' => $referenceExists ? User::current()->can('delete', $page->entry()) : true,
107107
'slug' => $page->slug(),

0 commit comments

Comments
 (0)