Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-06-07 10:38:21

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Ways to handle very long articles

I have a 10,000+ word technical walkthrough, complete with screenshots and code samples. It is, as you can probably imagine, unwieldy for a single page article.

I’m out of habit with long-form articles like this, and I want to publish with as few barriers to reader comprehension as possible. One of the methods I’ve seen, particularly with long-form reviews, is a select dropdown toward the footer with ‘Chapter 1: foo’, ‘Chapter 2: bar’, ‘Chapter 3: base’ options which hyperlink to the various parts of the article. I’m sure there are other clever ways, too.

From a publishing standpoint with the reader in mind, I can split the article across a 10+ individual articles and style them the same so they appear coherent and matched, but is there a Textpattern-native (or a plugin, if needed) method that I can insert something into a single long-form article that achieves the same thing as splitting the article? Effectively like this, which is a bit like <a name="#woo">, I suppose:

<txp:something_to_indicate_a_chapter_id id="1" />

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean purus ligula, ultrices sit amet ultricies eget, mattis id urna. Mauris libero ligula, feugiat id laoreet sollicitudin, luctus et libero. Proin mi odio, fermentum sed elementum vel, facilisis mollis enim. In bibendum nisl ut dolor molestie, vitae semper nisl sollicitudin. Proin nisl lorem, bibendum quis velit eget, sagittis viverra purus. Fusce eleifend ut massa vel tincidunt. Pellentesque ut enim augue. Nam interdum massa tellus, ac rutrum nibh convallis non. Vivamus a convallis metus. Ut arcu sem, euismod eget mauris eu, volutpat facilisis dui. Mauris et lobortis turpis. Sed sit amet lacinia purus, eget interdum quam. Cras quis mi id lacus semper egestas facilisis eget augue. Nam ut rutrum justo.

<txp:something_to_indicate_a_chapter_id id="2" />

Nulla placerat metus diam, efficitur varius risus venenatis nec. Sed quam turpis, facilisis sit amet vulputate at, placerat ac libero. Ut massa turpis, condimentum vel ultricies in, hendrerit id metus. Maecenas eleifend facilisis magna convallis auctor. Proin tempor vehicula fermentum. Cras in malesuada ipsum. Nulla auctor elit sed eleifend ultricies. Proin eu varius lorem. Phasellus nec rhoncus libero, ut elementum est. Sed porttitor pulvinar mi sed consectetur. Sed vel ipsum sem. Sed molestie, magna ut bibendum sodales, purus sem porttitor ex, vestibulum ornare ante tortor eget mauris. Suspendisse dictum convallis lorem, vel dictum ante rhoncus ut.

Take this (work safe) example:

That’s the base article. Ars Technica use pages with hyperlinks, which have this URL format (note the trailing numbers):

http://arstechnica.com/apple/2015/05/review-the-absolutely-optional-apple-watch-and-watch-os-1-0/2/
http://arstechnica.com/apple/2015/05/review-the-absolutely-optional-apple-watch-and-watch-os-1-0/3/
http://arstechnica.com/apple/2015/05/review-the-absolutely-optional-apple-watch-and-watch-os-1-0/4/

…and so on. This is what I want to achieve. Perhaps inevitably, Ars Technica do this with WordPress – can something similar be achieved with Textpattern?

Thanks in advance.

Offline

#2 2015-06-07 11:13:06

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Ways to handle very long articles

Never used it, but there was soo_multi_doc before, not sure if it is current.

Offline

#3 2015-06-07 12:04:03

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: Ways to handle very long articles

Nice one -thanks, Jonathan.

Offline

#4 2015-06-07 12:33:11

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Ways to handle very long articles

Sure! Let us know how it goes…

Offline

#5 2015-06-07 13:58:14

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: Ways to handle very long articles

There’s also smd_pagicle. From Stef’s plugin page:

Automatically split long articles into bite-size hunks which visitors can navigate between using the handy pager. The whole article is loaded in one go; the various pages are simply switched into view via jQuery.

IIRC (toyed with it 5+ years ago) there’s an arbitrary codestring to separate the chapters, like
••• --- UNIQUE DIVIDER --- •••.
Edit: Removed what was inapplicable.

Last edited by uli (2015-06-07 14:00:50)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#6 2015-06-07 14:04:50

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: Ways to handle very long articles

Aha! An smd plugin – even better. Thanks, Uli.

Offline

#7 2015-06-07 16:02:33

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Ways to handle very long articles

I kind of like long articles to be on one url, especially when there is a printing stylesheet – but that’s just me:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#8 2015-06-07 16:09:55

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: Ways to handle very long articles

colak wrote #291404:

I kind of like long articles to be on one url, especially when there is a printing stylesheet – but that’s just me:)

There will be that option available, certainly. Perhaps a single article with appropriate anchors and presentation will achieve my goal. I’ll think on it.

Offline

#9 2015-06-08 11:49:41

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

Re: Ways to handle very long articles

If you prefer to keep it in one article and not load all in one go, take a look here. You can probably map http://arstechnica.com/.../2/ to http://arstechnica.com/.../?part=2 in .htaccess if needed.

Offline

#10 2015-06-08 12:01:01

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: Ways to handle very long articles

Thank you, Oleg – excellent.

Offline

Board footer

Powered by FluxBB