Tue, 16 Sep 2003

top

chrono_nav

<<reverse < index > forward>>

A new plugin that gives you links to entries that immediately precede or suceed the current post, chronologically speaking (although a tweak to the sort routine will change that.) I shamelessly stole the code from the tree plugin by Ryan Schram, the behavior of which is more sophisticated, because it descends and ascends into and out of your category hierarchy. I hacked out a few bits here, grafted on a few bits there.

Read the documentation for more information or download chrono_nav and just dig in.

chrono_nav is not very aesthetically pleasing unless you use it in conjunction with interpolate_fancy (or interpolate_pseudoxml if you like verbosity like I do.) Without being able to do conditionals, chrono_nav will pollute your index files with bogus "prev" and "next" links. With interpolate_fancy, you can show links conditionally, depending on whether you are at the first post, the last post, in an index.

For example:

<?$chrono_nav::prev unlike="^bogus_ante$"><a href="$chrono_nav::prev">&lt;&lt;reverse</a> |</?> <a href="http://blog.fatoprofugus.net">home</a> <?$chrono_nav::next unlike="^bogus_post$">| <a href="$chrono_nav::next">forward>></a></?>

This will generate home | forward>> on the first post, <<reverse | home on the last post, and <<reverse | home | forward>> on every post in between. (Notice the kludgery with the bogus tags. I can't seem to make $chrono_nav::prev and $chrono_nav::next return undef.)

10:57:54 16 Sep 2003 > /computers/www/blosxom > permalink > 0 comments

comments

Comment form

Name:
URL/Email:
[http://... or mailto:you@w...] (optional)
Title:
(optional)
Comments:
Save my Name and URL/Email for next time
To prevent comment spam, please retype the characters in this image
Enter the text here: