Browse Source
Merge pull request #23037 from abpframework/issue-23012
fix: Navigation Bug
pull/23039/head
Enis Necipoglu
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
20 additions and
1 deletions
-
modules/docs/src/Volo.Docs.Web/Pages/Documents/Index.cshtml
-
modules/docs/src/Volo.Docs.Web/Pages/Documents/Index.cshtml.cs
|
|
|
@ -31,7 +31,7 @@ |
|
|
|
{ |
|
|
|
<li> |
|
|
|
<h3> |
|
|
|
<a href="@(Model.DocumentsUrlPrefix + project.ShortName)"> |
|
|
|
<a href="@Model.GetUrlForProject(project)"> |
|
|
|
@project.Name |
|
|
|
</a> |
|
|
|
</h3> |
|
|
|
|
|
|
|
@ -43,5 +43,24 @@ namespace Volo.Docs.Pages.Documents |
|
|
|
|
|
|
|
return Page(); |
|
|
|
} |
|
|
|
|
|
|
|
public string GetUrlForProject(ProjectDto project = null, string language = "en", string version = null) |
|
|
|
{ |
|
|
|
var routeValues = new Dictionary<string, object> { |
|
|
|
{ nameof(Project.IndexModel.Version), version ?? DocsAppConsts.Latest } |
|
|
|
}; |
|
|
|
|
|
|
|
if (!_uiOptions.SingleProjectMode.Enable) |
|
|
|
{ |
|
|
|
routeValues.Add(nameof(Project.IndexModel.ProjectName), project?.ShortName); |
|
|
|
} |
|
|
|
|
|
|
|
if (_uiOptions.MultiLanguageMode) |
|
|
|
{ |
|
|
|
routeValues.Add(nameof(Project.IndexModel.LanguageCode), language); |
|
|
|
} |
|
|
|
|
|
|
|
return Url.Page("/Documents/Project/Index", routeValues); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|