Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2023-12-07 13:47:37

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

RFC: default pagination bar

I’m trying to simplify the default behaviour of <txp:pages /> tag, aimed to construct pagination bars. It is highly customizable, but rather verbose. So

  • what should be the “default” navigation bar structure if the number of pages is very large (first/last, prev/next, gaps, …)?
  • which attributes would help to construct such a bar?
  • whatever else?

Thanks.

Offline

#2 2023-12-08 06:51:58

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,599
GitHub Twitter

Re: RFC: default pagination bar

Yeah. Currently, it’s a bit complex. What do you propose? Invoke certain attributes like break and breakby? Sure, for a large navigation bar, indicators (first/last, prev/next) are necessary. (I noticed you recently introduce offset as URLs parameters)

Last edited by Pat64 (2023-12-08 06:54:26)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#3 2023-12-08 08:20:13

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: RFC: default pagination bar

Pat64 wrote #336053:

What do you propose?

I have asked first :-) Suppose that you would like to construct a bar with first/prev/.../main/.../next/last links in one go:

<txp:pages with some attributes />

What would be the attributes and the expected result?

Offline

#4 2023-12-08 08:51:44

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,599
GitHub Twitter

Re: RFC: default pagination bar

first and last are expected (but facultative). Then, next and prev too (but needed). Seems we need a class attribute for the current (active) page.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#5 2023-12-08 09:22:43

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: RFC: default pagination bar

Yep, whence my questions. What would be a minimal html markup allowing users to style the bar? We can set rel for next/prev links, but rel="first/last/current" is deprecated. Could we set data-rel instead of class, for example?

Offline

Board footer

Powered by FluxBB