News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Changing the page links for current page

Started by franhaselden, August 16, 2018, 10:16:38 AM

Previous topic - Next topic

franhaselden

Having trouble finding where this is located.

The page links at the bottom/top of each page read like:

QuotePages: [1] 2 3 .... 10

I want to remove the [] around the current page as I have styled it to make it obvious which page the user is on. Cannot find where the [] is set for current pages.

I found this line:

Quote<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '' : '', '</div>

But cannot work out where the [] is set in this or elsewhere.

Arantor

It's set up in constructPageIndex in Subs.php, if my memory doesn't deceive me. Definitely in Subs.php, I'm just not exactly 100% on the name.

Sir Osis of Liver

Subs.php



// Show the current page. (1 ... 6 7 >[8]< 9 10 ... 15)
if (!$start_invalid)
$pageindex .= '[<strong>' . ($start / $num_per_page + 1) . '</strong>] ';


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Mick.

Quote from: Sir Osis of Liver on August 16, 2018, 05:20:10 PM
Subs.php



// Show the current page. (1 ... 6 7 >[8]< 9 10 ... 15)
if (!$start_invalid)
$pageindex .= '[<strong>' . ($start / $num_per_page + 1) . '</strong>] ';




Remove the brackets and if you want, the strong tags.   ' . ($start / $num_per_page + 1) . '

Advertisement: