[RFC|Merged] Pagination as <ul> list

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
ecwpa
Registered User
Posts: 181
Joined: Mon Jan 24, 2005 2:10 am
Contact:

[RFC|Merged] Pagination as <ul> list

Post by ecwpa »

Currently the pagination styling is done by a class called .pagination. The html rendered shows something like this:

Code: Select all

<div class="pagination">
			11 mensajes
			 • <a href="#" onclick="jumpto(); return false;" title="Clic para saltar a página…">Página <strong>1</strong> de <strong>2</strong></a> • <span><strong>1</strong><span class="page-sep">, </span><a href="./viewtopic.php?etc">2</a></span>
		</div>
I guess you can see how messy it looks, this is my alternative:

Code: Select all

<div class="pagination">
    <ul>
        <li>11 mensajes</li>
        <li><a href="#" onclick="jumpto(); return false;" title="Clic para saltar a página…"></li>
        <li>Página <strong>1</strong> de <strong>2</strong></a></li>
        <li>1</li>
        <li><a href="./viewtopic.php?etc">2</a></li>
    </ul>
</div>
Or something like that, the point is, the current state looks outdated and not that easy to customize IMO.

TICKET: http://tracker.phpbb.com/browse/PHPBB3-10968
Last edited by naderman on Thu Jul 19, 2012 1:29 pm, edited 4 times in total.
Reason: Add ticket
Slightly better English than it was in 2005, still improving :D

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Pagination as <ul> list

Post by callumacrae »

+1
Made by developers, for developers!
My blog

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: [RFC] Pagination as <ul> list

Post by MichaelC »

+1
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Pagination as <ul> list

Post by brunoais »

+1


User avatar
AliasM2K
Registered User
Posts: 82
Joined: Tue Mar 27, 2012 2:33 am

Re: [RFC] Pagination as <ul> list

Post by AliasM2K »

+1 of course :D

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Pagination as <ul> list

Post by brunoais »

+1 :D

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [RFC] Pagination as <ul> list

Post by hanakin »

+1

this was mentioned along with several other mistakes in the backend that produce in proper semantics or render html when they only need to output text in a post I made awhile back
Donations welcome via Paypal Image

User avatar
Meis2M
Registered User
Posts: 451
Joined: Fri Apr 23, 2010 10:18 am
Contact:

Re: [RFC] Pagination as <ul> list

Post by Meis2M »

and +2

User avatar
psoTFX
Registered User
Posts: 1984
Joined: Tue Jul 03, 2001 8:50 pm
Contact:

Re: [RFC] Pagination as <ul> list

Post by psoTFX »

I've opened a ticket for this. It's a little different from the op's original proposal but accomplishes the basic requirement. Rendering of pagination moves entirely to the template where the markup is of the (general) form:

Code: Select all

<div class="pagination">
				<ul>
				<!-- BEGIN pagination -->
					<!-- IF pagination.S_IS_PREV -->
					<!-- ELSEIF pagination.S_IS_CURRENT -->
					<li class="active"><span>{pagination.PAGE_NUMBER}</span></li>
					<!-- ELSEIF pagination.S_IS_ELLIPSIS -->
					<li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
					<!-- ELSEIF pagination.S_IS_NEXT -->
					<!-- ELSE -->
					<li><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a></li>
					<!-- ENDIF -->
				<!-- END pagination -->
				</ul>
</div>
This looks a bit "woowah!" - but I think it gives complete control of just what is shown. For example rather than the source deciding whether to show next/previous the style designer can and the form they may take. Likewise the form of any ellipsis, how "current" (active) elements are displayed, etc. Pagination can still be embedded within other blocks, e.g. on viewforum (for multi-page topics), etc. in the process I eliminated the seperate topic_generate_pagination function and merged it with generate_pagination (I did take a couple of liberties but they are just consistent with how things have worked for years). I need to modify the subsilver2 templates then I'll put in a PR.

Post Reply