Skip to content

Commit 06c8566

Browse files
committed
Don't show "Edit this page" link on search page
1 parent 15c8841 commit 06c8566

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

input/Search.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
HideFromSearchIndex: true
22
Excluded: => !Context.GetBool(WebKeys.GenerateSearchIndex)
33
ShowInNavigation: false
4+
EditLink:
45
---
56
<form>
67
<div class="form-group">

input/Shared/_RightSidebar.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
: null);
1111
if (headings?.Count > 0)
1212
{
13-
<div class="@(editLink != null ? "border-bottom" : string.Empty) mb-3 sidebar-root">
13+
<div class="@(!string.IsNullOrWhiteSpace(editLink) ? "border-bottom" : string.Empty) mb-3 sidebar-root">
1414
<div class="sidebar-nav-item sidebar-header">On This Page</div>
1515
<div class="sidebar-nav-children">
1616
@foreach (IDocument heading in headings)
@@ -34,7 +34,7 @@
3434
</div>
3535
</div>
3636
}
37-
if (editLink != null)
37+
if (!string.IsNullOrWhiteSpace(editLink))
3838
{
3939
<p class="small font-weight-bold"><a href="@editLink" data-no-validate><i class="fad fa-pencil"></i> Edit This Page</a></p>
4040
}

0 commit comments

Comments
 (0)