Skip to content

Commit b581915

Browse files
committed
Consolidated warnings for NoIndex and IsHidden
The messaging was a bit confusing if a topic was both `IsHidden` _and_ set to `NoIndex`. To address this, I handle that case separately.
1 parent a1f0fca commit b581915

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

  • OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor

OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Edit.cshtml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,19 @@
3838
<strong>Warning:</strong> Not all relationships were successfully loaded from the database. To prevent inadvertent deletion of relationships, any relationships that are removed won't be persisted to the database. You can still add new relationships.
3939
</div>
4040
}
41-
@if (Model.Topic.IsHidden) {
41+
@if (Model.Topic.IsHidden && Model.Topic.NoIndex) {
42+
<div class="alert alert-warning" role="alert">
43+
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
44+
<strong>Note:</strong> This topic is currently hidden from both search engines and the site navigation. Customers can still access it by URL, including direct links.
45+
</div>
46+
}
47+
else if (Model.Topic.IsHidden) {
4248
<div class="alert alert-warning" role="alert">
4349
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
4450
<strong>Note:</strong> This topic is currently hidden and will not be displayed in the site navigation. Customers can still access it, and it will still show up in search results.
4551
</div>
4652
}
47-
@if (Model.Topic.NoIndex) {
53+
else if (Model.Topic.NoIndex) {
4854
<div class="alert alert-warning" role="alert">
4955
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
5056
<strong>Note:</strong> This topic is currently hidden from search engines. Customers can still access it, but it won't show up in search results.

0 commit comments

Comments
 (0)