I’d say WP is the easiest to code for, and what you want to do is defiantely possible, though i couldn’t say how easy it will be for you…
You can use <!--nextpage-->
in posts which creates a paged version of the post, this would easily suit chapters. I’ve not used it extensively so can’t comment how easy it is to grab ‘pages’ or ‘chapters’, nor whether a simple function exists for grabbing a given page or post’s list of chapters/pages.
Sorting articles is straight-forward enough, the query_posts function can be modified easily, updating that on a user clicking, lets say “sort by date” is easy.
Ordinarily you’d just have this in your given template file (theme file).
<?php while (have_posts()) : the_post(); ?>
followed by various pieces of HTML etc…
Of course you can narrow down the results for the posts being shown by simply doing …
<?php query_posts($arguments); ?>
Where $arguments is actually a series of supported arguments, as explained here.
https://codex.www.ads-software.com/Template_Tags/query_posts
All you’d need to do is change that line depending on what is clicked, here’s a very basic example..
<?php
$sortord = isset($_GET['order']);
switch ($sortord) {
case 'date' :
$some_query = query_posts('orderby=date');
case 'category' :
$some_query = query_posts('orderby=category');
default:
$some_query = query_posts();
}
?>
That’s totally untested but the method is still valid in any case..
Going on the example, order would be change by clicking on links like so..
Order by date:
https://someexample.com/?order=date
Order by category:
https://someexample.com/?order=category