Skip to content

Commit

Permalink
paging url-template
Browse files Browse the repository at this point in the history
  • Loading branch information
LazZiya committed May 4, 2022
1 parent e46cbcb commit ccc4814
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
13 changes: 7 additions & 6 deletions LazZiya.TagHelpers/LazZiya.TagHelpers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@
<Company>Ziyad.info</Company>
<Description>Collection of tag helpers for ASP.NET Core web applications, like Paging, SelectEnum and LanguageNav dropdown tag helpers for MVC and Razor Pages.</Description>
<Copyright>Ziyad.info</Copyright>
<PackageProjectUrl>https://docs.ziyad.info/en/LazZiya.TagHelpers/v5.0/index.md</PackageProjectUrl>
<PackageProjectUrl>https://docs.ziyad.info/en/LazZiya.TagHelpers/v6.0/index.md</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageTags>asp.net, core, razor, mvc, taghelpers, taghelper,tag,helper,language,culture,dropdown, pagination, select, enum</PackageTags>
<PackageReleaseNotes>
- 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
</PackageReleaseNotes>
<VersionPrefix>6.0.1</VersionPrefix>
<VersionPrefix>6.0.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<FileVersion>6.0.0.0</FileVersion>
<AssemblyVersion>6.0.2.0</AssemblyVersion>
<FileVersion>6.0.2.0</FileVersion>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIconUrl>https://raw.githubusercontent.com/LazZiya/TagHelpers/master/LazZiya.TagHelpers/files/icon.png</PackageIconUrl>
Expand Down
1 change: 1 addition & 0 deletions LazZiya.TagHelpers/LazZiya.TagHelpers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1325,3 +1325,4 @@
</member>
</members>
</doc>
oc>
5 changes: 3 additions & 2 deletions LazZiya.TagHelpers/PagingTagHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class PagingTagHelper : TagHelper
/// e.g.
/// <![CDATA[?p={0}&s={1}&q=test]]>
/// </summary>
private string UrlTemplate { get; set; }
public string UrlTemplate { get; set; }

/// <summary>
/// <para>ViewContext property is not required to be passed as parameter, it will be assigned automatically by the tag helper.</para>
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit ccc4814

Please sign in to comment.