From ccc48149697021ef1bda8474a78b53e2dc2597ec Mon Sep 17 00:00:00 2001 From: Ziya Mollamahmut Date: Wed, 4 May 2022 13:32:23 +0300 Subject: [PATCH] paging url-template --- LazZiya.TagHelpers/LazZiya.TagHelpers.csproj | 13 +++++++------ LazZiya.TagHelpers/LazZiya.TagHelpers.xml | 1 + LazZiya.TagHelpers/PagingTagHelper.cs | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/LazZiya.TagHelpers/LazZiya.TagHelpers.csproj b/LazZiya.TagHelpers/LazZiya.TagHelpers.csproj index e8eb125..9dd9ac3 100644 --- a/LazZiya.TagHelpers/LazZiya.TagHelpers.csproj +++ b/LazZiya.TagHelpers/LazZiya.TagHelpers.csproj @@ -7,19 +7,20 @@ Ziyad.info Collection of tag helpers for ASP.NET Core web applications, like Paging, SelectEnum and LanguageNav dropdown tag helpers for MVC and Razor Pages. Ziyad.info - https://docs.ziyad.info/en/LazZiya.TagHelpers/v5.0/index.md + https://docs.ziyad.info/en/LazZiya.TagHelpers/v6.0/index.md icon.png true asp.net, core, razor, mvc, taghelpers, taghelper,tag,helper,language,culture,dropdown, pagination, select, enum - - Fixed #22 https://github.com/LazZiya/TagHelpers/issues/22 - - Merged #23 https://github.com/LazZiya/TagHelpers/pull/23 + - New public param "url-template" use custom url template for the paging buttons. + - Fixed #21 https://github.com/LazZiya/TagHelpers/issues/21 + - Fixed #27 https://github.com/LazZiya/TagHelpers/issues/27 - See all release notes in https://github.com/LazZiya/TagHelpers/releases - 6.0.1 + 6.0.2 - 6.0.0.0 - 6.0.0.0 + 6.0.2.0 + 6.0.2.0 false MIT https://raw.githubusercontent.com/LazZiya/TagHelpers/master/LazZiya.TagHelpers/files/icon.png diff --git a/LazZiya.TagHelpers/LazZiya.TagHelpers.xml b/LazZiya.TagHelpers/LazZiya.TagHelpers.xml index 74d3ac7..4ba29a2 100644 --- a/LazZiya.TagHelpers/LazZiya.TagHelpers.xml +++ b/LazZiya.TagHelpers/LazZiya.TagHelpers.xml @@ -1325,3 +1325,4 @@ +oc> diff --git a/LazZiya.TagHelpers/PagingTagHelper.cs b/LazZiya.TagHelpers/PagingTagHelper.cs index 136f79c..41b981a 100644 --- a/LazZiya.TagHelpers/PagingTagHelper.cs +++ b/LazZiya.TagHelpers/PagingTagHelper.cs @@ -28,7 +28,7 @@ public class PagingTagHelper : TagHelper /// e.g. /// /// - private string UrlTemplate { get; set; } + public string UrlTemplate { get; set; } /// /// ViewContext property is not required to be passed as parameter, it will be assigned automatically by the tag helper. @@ -396,7 +396,8 @@ public override void Process(TagHelperContext context, TagHelperOutput output) ShowFirstLast = true; } - UrlTemplate = CreatePagingUrlTemplate(); + if(string.IsNullOrWhiteSpace(UrlTemplate)) + UrlTemplate = CreatePagingUrlTemplate(); if (ShowFirstLast == true) {