Skip to content

Commit

Permalink
Don't show "Edit this page" link on search page
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Jan 31, 2023
1 parent 15c8841 commit 06c8566
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions input/Search.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
HideFromSearchIndex: true
Excluded: => !Context.GetBool(WebKeys.GenerateSearchIndex)
ShowInNavigation: false
EditLink:
---
<form>
<div class="form-group">
Expand Down
4 changes: 2 additions & 2 deletions input/Shared/_RightSidebar.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
: null);
if (headings?.Count > 0)
{
<div class="@(editLink != null ? "border-bottom" : string.Empty) mb-3 sidebar-root">
<div class="@(!string.IsNullOrWhiteSpace(editLink) ? "border-bottom" : string.Empty) mb-3 sidebar-root">
<div class="sidebar-nav-item sidebar-header">On This Page</div>
<div class="sidebar-nav-children">
@foreach (IDocument heading in headings)
Expand All @@ -34,7 +34,7 @@
</div>
</div>
}
if (editLink != null)
if (!string.IsNullOrWhiteSpace(editLink))
{
<p class="small font-weight-bold"><a href="@editLink" data-no-validate><i class="fad fa-pencil"></i> Edit This Page</a></p>
}
Expand Down

0 comments on commit 06c8566

Please sign in to comment.