C# Class N2Bootstrap.Library.PagingLinksBuilder

Builds paging links for a given pageNumber and totalPages in a fully configurable fashion.
Inheritance: IHtmlString
Afficher le fichier Open project: pauldotknopf/N2Bootstrap

Méthodes publiques

Méthode Description
ActiveCssClass ( string activeCssClass ) : PagingLinksBuilder

Set the \"active\" css class

AlwaysShowNavigation ( bool alwaysShowNavigation ) : PagingLinksBuilder

The first/previous/next/last links will be hidden if they are not valid. This bool will allow you to always render them, but render them disabled (javascript:void() with disabledCssClass).

DisabledCssClass ( string disabledCssClass ) : PagingLinksBuilder

Set the \"disabled\" css class

FirstCssClass ( string firstCssClass ) : PagingLinksBuilder

Set the \"first\" css class

FirstText ( string firstText ) : PagingLinksBuilder

Set the 'First' link text'.

ItemTemplate ( HelperResult>.Func itemTempate ) : PagingLinksBuilder

Set the item template to use. ------------- Default -------------

  • @item.LinkRender
  • -------------

    LastCssClass ( string lastCssClass ) : PagingLinksBuilder

    Set the \"last\" css class

    LastText ( string lastText ) : PagingLinksBuilder

    Set the 'Last' link text'.

    LayoutTemplate ( HelperResult>.Func layoutTemplate ) : PagingLinksBuilder

    Set the layout template to use. ------------- Default -------------

    -------------

    LinkTemplate ( HelperResult>.Func linkTemplate ) : PagingLinksBuilder

    Set the link template to use. ------------- Default ------------- @item.LinkText -------------

    MaxNumberOfTrailingLeadingPages ( int maxNumberOfTrailingLeadingPages ) : PagingLinksBuilder

    Sets the maximum number of trailing/leading pages. For example: MaxNumberOfTrailingLeadingPages(2); [1] - 2 - 3 - 4 - 5 3 - 4 - [5] - 6 - 7 5 - 6 - 7 - 8 - [9] MaxNumberOfTrailingLeadingPages(3); [1] - 2 - 3 - 4 - 5 - 6 - 7 2 - 3 - 4 - [5] - 6 - 7 - 8 3 - 4 - 5 - 6 - 7 - 8 - [9]

    NextCssClass ( string nextCssClass ) : PagingLinksBuilder

    Set the \"next\" css class

    NextPrevious ( string previousText ) : PagingLinksBuilder

    Set the 'Previous' link text'.

    NextText ( string nextText ) : PagingLinksBuilder

    Set the 'Next' link text'.

    PageCssClass ( string pageCssClass ) : PagingLinksBuilder

    Set the \"page\" css class

    PageUrlBuilder ( string>.Func pageUrlBuilder ) : PagingLinksBuilder

    Set the page-url builder that will be invoked when rendering pieces need a url to a page.

    PagingLinksBuilder ( int currentPage, int totalPages, string>.Func pageUrlBuilder ) : System

    Initializes a new PagingLinksBuilder

    PreviousCssClass ( string previousCssClass ) : PagingLinksBuilder

    Set the \"previous\" css class

    ToHtmlString ( ) : string

    Private Methods

    Méthode Description
    BuildItem ( string text, int pageNumber, LinkType linkType ) : System.Web.WebPages.HelperResult

    Builds an item (and the link nested within it)

    BuildPageRange ( Action action ) : void

    Builds the 'nearby' pages (21, 22, 23, 24, 25), etc.

    InitializeDefaults ( ) : void

    Initialize all the default values.

    Method Details

    ActiveCssClass() public méthode

    Set the \"active\" css class
    public ActiveCssClass ( string activeCssClass ) : PagingLinksBuilder
    activeCssClass string
    Résultat PagingLinksBuilder

    AlwaysShowNavigation() public méthode

    The first/previous/next/last links will be hidden if they are not valid. This bool will allow you to always render them, but render them disabled (javascript:void() with disabledCssClass).
    public AlwaysShowNavigation ( bool alwaysShowNavigation ) : PagingLinksBuilder
    alwaysShowNavigation bool
    Résultat PagingLinksBuilder

    DisabledCssClass() public méthode

    Set the \"disabled\" css class
    public DisabledCssClass ( string disabledCssClass ) : PagingLinksBuilder
    disabledCssClass string
    Résultat PagingLinksBuilder

    FirstCssClass() public méthode

    Set the \"first\" css class
    public FirstCssClass ( string firstCssClass ) : PagingLinksBuilder
    firstCssClass string
    Résultat PagingLinksBuilder

    FirstText() public méthode

    Set the 'First' link text'.
    public FirstText ( string firstText ) : PagingLinksBuilder
    firstText string
    Résultat PagingLinksBuilder

    ItemTemplate() public méthode

    Set the item template to use. ------------- Default -------------
  • @item.LinkRender
  • -------------
    public ItemTemplate ( HelperResult>.Func itemTempate ) : PagingLinksBuilder
    itemTempate HelperResult>.Func
    Résultat PagingLinksBuilder

    LastCssClass() public méthode

    Set the \"last\" css class
    public LastCssClass ( string lastCssClass ) : PagingLinksBuilder
    lastCssClass string
    Résultat PagingLinksBuilder

    LastText() public méthode

    Set the 'Last' link text'.
    public LastText ( string lastText ) : PagingLinksBuilder
    lastText string
    Résultat PagingLinksBuilder

    LayoutTemplate() public méthode

    Set the layout template to use. ------------- Default ------------- -------------
    public LayoutTemplate ( HelperResult>.Func layoutTemplate ) : PagingLinksBuilder
    layoutTemplate HelperResult>.Func
    Résultat PagingLinksBuilder

    LinkTemplate() public méthode

    Set the link template to use. ------------- Default ------------- @item.LinkText -------------
    public LinkTemplate ( HelperResult>.Func linkTemplate ) : PagingLinksBuilder
    linkTemplate HelperResult>.Func
    Résultat PagingLinksBuilder

    MaxNumberOfTrailingLeadingPages() public méthode

    Sets the maximum number of trailing/leading pages. For example: MaxNumberOfTrailingLeadingPages(2); [1] - 2 - 3 - 4 - 5 3 - 4 - [5] - 6 - 7 5 - 6 - 7 - 8 - [9] MaxNumberOfTrailingLeadingPages(3); [1] - 2 - 3 - 4 - 5 - 6 - 7 2 - 3 - 4 - [5] - 6 - 7 - 8 3 - 4 - 5 - 6 - 7 - 8 - [9]
    public MaxNumberOfTrailingLeadingPages ( int maxNumberOfTrailingLeadingPages ) : PagingLinksBuilder
    maxNumberOfTrailingLeadingPages int
    Résultat PagingLinksBuilder

    NextCssClass() public méthode

    Set the \"next\" css class
    public NextCssClass ( string nextCssClass ) : PagingLinksBuilder
    nextCssClass string
    Résultat PagingLinksBuilder

    NextPrevious() public méthode

    Set the 'Previous' link text'.
    public NextPrevious ( string previousText ) : PagingLinksBuilder
    previousText string
    Résultat PagingLinksBuilder

    NextText() public méthode

    Set the 'Next' link text'.
    public NextText ( string nextText ) : PagingLinksBuilder
    nextText string
    Résultat PagingLinksBuilder

    PageCssClass() public méthode

    Set the \"page\" css class
    public PageCssClass ( string pageCssClass ) : PagingLinksBuilder
    pageCssClass string
    Résultat PagingLinksBuilder

    PageUrlBuilder() public méthode

    Set the page-url builder that will be invoked when rendering pieces need a url to a page.
    public PageUrlBuilder ( string>.Func pageUrlBuilder ) : PagingLinksBuilder
    pageUrlBuilder string>.Func
    Résultat PagingLinksBuilder

    PagingLinksBuilder() public méthode

    Initializes a new PagingLinksBuilder
    public PagingLinksBuilder ( int currentPage, int totalPages, string>.Func pageUrlBuilder ) : System
    currentPage int
    totalPages int
    pageUrlBuilder string>.Func The delegate that will be used to be page urls, for example: /category?page=1
    Résultat System

    PreviousCssClass() public méthode

    Set the \"previous\" css class
    public PreviousCssClass ( string previousCssClass ) : PagingLinksBuilder
    previousCssClass string
    Résultat PagingLinksBuilder

    ToHtmlString() public méthode

    public ToHtmlString ( ) : string
    Résultat string