Browse Source

Fix link for pages module in CP main menu

Vova Tkach 6 years ago
parent
commit
dcf9f1d9b5
1 changed files with 5 additions and 1 deletions
  1. 5 1
      modules/modules.go

+ 5 - 1
modules/modules.go

@@ -171,7 +171,11 @@ func (this *Modules) getNavMenuModules(wrap *wrapper.Wrapper, sys bool) string {
 		if mod.Mount == wrap.CurrModule {
 			class = " active"
 		}
-		html += `<a class="dropdown-item` + class + `" href="/cp/` + mod.Mount + `/">` + mod.Name + `</a>`
+		href := `/cp/` + mod.Mount + `/`
+		if mod.Mount == "index" {
+			href = `/cp/`
+		}
+		html += `<a class="dropdown-item` + class + `" href="` + href + `">` + mod.Name + `</a>`
 	}
 	return html
 }