Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2021-03-16 05:39:38

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 304
Website

Re: Different number of articles on page 1 and following pages

etc wrote #329258:

This said, we can already break lists in variously sized chunks with breakby="5,6,6,..." Probably, pageby could do it too? I remember having thought about it, but something has stopped me… but what?

I tried using pageby in several configurations, but was unable to find one that worked.


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

#14 2021-03-16 05:47:35

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 304
Website

Re: Different number of articles on page 1 and following pages

Many thanks to all of you for thinking about a solution for this unusual case.

Because the know-how explodes off the page I have found reading your suggestions and explanations exhilarating.

Hopefully, other users will find this helpful, too.


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

#15 2021-03-16 09:05:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,263
Website GitHub

Re: Different number of articles on page 1 and following pages

Kjeld wrote #329269:

The only drawback I can think of is that there can be only a single sticky article…

Not sure what you mean. You could put two stickies if you want. As long as you ensure that the one you want to appear first has a greater posting date than the second they’ll both show up. And if you want to do this in other sections, just put one or more stickies in those sections and apply the same logic.

Incidentally, I don’t fully understand how sort="Status DESC" makes the sticky article appear first.

It sorts the status by value. 5=Sticky, 4=Live.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#16 2021-03-16 09:16:45

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 304
Website

Re: Different number of articles on page 1 and following pages

Bloke wrote #329275:

Not sure what you mean. You could put two stickies if you want. As long as you ensure that the one you want to appear first has a greater posting date than the second they’ll both show up. And if you want to do this in other sections, just put one or more stickies in those sections and apply the same logic.

Sorry, I was not clear.

I intended to say that if you don’t want other stickies to appear on the default page, you can only make one article sticky.

It sorts the status by value. 5=Sticky, 4=Live.

Aha! Mystery solved. Thanks, Bloke.


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

#17 2021-03-16 10:03:35

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,263
Website GitHub

Re: Different number of articles on page 1 and following pages

Kjeld wrote #329276:

I intended to say that if you don’t want other stickies to appear on the default page, you can only make one article sticky.

Ah, gotcha. In that case yeah, you’ll need to distinguish them by some other means (e.g. category or custom field) and find a way to exclude those from the tag, which probably means using <txp:article_custom> instead.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#18 2021-03-16 10:25:28

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 304
Website

Re: Different number of articles on page 1 and following pages

Bloke wrote #329279:

Ah, gotcha. In that case yeah, you’ll need to distinguish them by some other means (e.g. category or custom field) and find a way to exclude those from the tag, which probably means using <txp:article_custom> instead.

I was able to put them in a separate section and marked that section ‘No’ for ‘On default page’

Problem solved ^_-


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

#19 2021-03-16 11:00:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,263
Website GitHub

Re: Different number of articles on page 1 and following pages

Kjeld wrote #329282:

I was able to put them in a separate section and marked that section ‘No’ for ‘On default page’

Cunning! I like it.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB