diff --git a/GanjooRazor/Pages/Index.cshtml b/GanjooRazor/Pages/Index.cshtml index 5d53c988..6921c318 100644 --- a/GanjooRazor/Pages/Index.cshtml +++ b/GanjooRazor/Pages/Index.cshtml @@ -299,40 +299,42 @@ } } + + @if (Model.IsCatPage || Model.IsPoetPage) + { + + } + + @if (Model.GanjoorPage != null && Model.GanjoorPage.Id == 39401) + { + + } + } - @if (Model.IsCatPage || Model.IsPoetPage) - { - - } - - @if (Model.GanjoorPage != null && Model.GanjoorPage.Id == 39401) - { - - } diff --git a/TajikGanjoor/Pages/Index.cshtml.cs b/TajikGanjoor/Pages/Index.cshtml.cs index 648fb2c4..51c2d640 100644 --- a/TajikGanjoor/Pages/Index.cshtml.cs +++ b/TajikGanjoor/Pages/Index.cshtml.cs @@ -24,7 +24,7 @@ namespace TajikGanjoor.Pages public string NextTitle { get; set; } public string PreviousUrl { get; set; } public string PreviousTitle { get; set; } - + public string BreadCrumpUrls { get; set; } public async Task OnGetAsync() @@ -34,6 +34,7 @@ namespace TajikGanjoor.Pages return StatusCode(503); } + if(false == await PreparePoetsAsync()) { return Page(); @@ -85,6 +86,7 @@ namespace TajikGanjoor.Pages } + BreadCrumpUrls = "Ганҷур"; if (IsHomePage) { ViewData["Title"] = "Ганҷур"; @@ -93,30 +95,30 @@ namespace TajikGanjoor.Pages if (IsPoetPage) { ViewData["Title"] = $"Ганҷур - {GanjoorPage?.PoetOrCat.Poet.TajikNickName}"; + BreadCrumpUrls += $" - {GanjoorPage?.PoetOrCat.Poet.TajikNickName}\""; } else - if (IsCatPage) + if (IsCatPage || IsPoemPage) { string title = $"Ганҷур - "; foreach (var gran in GanjoorPage.PoetOrCat.Cat.Ancestors) { title += $"{gran.TajikTitle} - "; + BreadCrumpUrls += $" - {gran.TajikTitle}\""; } - title += GanjoorPage.PoetOrCat.Cat.TajikTitle; - ViewData["Title"] = title; - } - else - if (IsPoemPage) - { - string title = $"Ганҷур - "; - foreach (var gran in GanjoorPage.PoetOrCat.Cat.Ancestors) + if(IsCatPage) { - title += $"{gran.TajikTitle} - "; + title += GanjoorPage.PoetOrCat.Cat.TajikTitle; + BreadCrumpUrls += $" - {GanjoorPage?.PoetOrCat.Cat.TajikTitle}\""; + } + else + { + title += GanjoorPage.Poem.TajikTitle; + BreadCrumpUrls += $" - {GanjoorPage?.Poem.TajikTitle}\""; } - title += GanjoorPage.Poem.TajikTitle; ViewData["Title"] = title; } - + ViewData["BreadCrumpUrls"] = BreadCrumpUrls; return Page(); } diff --git a/TajikGanjoor/Pages/Shared/_Layout.cshtml b/TajikGanjoor/Pages/Shared/_Layout.cshtml index c7eb4a88..650c4904 100644 --- a/TajikGanjoor/Pages/Shared/_Layout.cshtml +++ b/TajikGanjoor/Pages/Shared/_Layout.cshtml @@ -12,7 +12,7 @@