Commit 0606555b by Ryan McKinley Committed by GitHub

App Plugins: support react pages in nav (#22428)

parent 2b6a88bf
......@@ -230,10 +230,21 @@ func (hs *HTTPServer) setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, er
}
if include.Type == "page" && include.AddToNav {
link := &dtos.NavLink{
var link *dtos.NavLink
if len(include.Path) > 0 {
link = &dtos.NavLink{
Url: setting.AppSubUrl + include.Path,
Text: include.Name,
}
if include.DefaultNav {
appLink.Url = link.Url // Overwrite the hardcoded page logic
}
} else {
link = &dtos.NavLink{
Url: setting.AppSubUrl + "/plugins/" + plugin.Id + "/page/" + include.Slug,
Text: include.Name,
}
}
appLink.Children = append(appLink.Children, link)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment