1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lower pagination on messages

Discussion in 'Troubleshooting and Problems' started by Bram, Jan 28, 2013.

  1. Bram

    Bram Well-Known Member

    I can't find a setting in the admincp that sets the pagination of different pages on thread level. Its currently on my style 8 items but i wish to lower the number as my new style is a bit more narrow.
  2. Jon W

    Jon W Well-Known Member


    This is not an Admin CP option yet, although it is marked in the code as a 'TODO' item (as you will see below), so likely it will be added in a future release.

    To do this manually, the line to replace is line 685 of XenForo_Template_Helper_Core:
    'displayRange' => //TODO: make this come from an option?
    where 2 is the number of pages displayed either side of the current page (except for the first and last few pages).

    For example, if the current page is page 8 and there are 15 pages, the two either side that it will show are pages 6, 7, 9 and 10. If you increase this to 3, it will additionally show pages 5 and 11, etc. etc.

    You will also need to change a line in the page_nav.css template:
    .PageNav .scrollable
        position: relative;
        overflow: hidden;
        width: {xen:calc '(@pageNavLinkWidth * 5) + (@pageNavLinkSpacing * 4) + (@pageNavLink.border-width * 10)'}px; /* width of 5 page numbers plus their margin & border */
        height: 18px; /* only needs to be approximate */
    You will need to change the width element. So, if you increased the displayRange to 3, you would add the following to EXTRA.CSS (or replace it above or in some other CSS file):
    .PageNav .scrollable
        width: {xen:calc '(@pageNavLinkWidth * 7) + (@pageNavLinkSpacing * 6) + (@pageNavLink.border-width * 14)'}px; /* width of 7 page numbers plus their margin & border */
    I will see if I can incorporate this into an add-on as it is never recommended to edit core files directly.
    Bram likes this.

Share This Page