Hi all -
Great news about the ongoing development of Hyde. I'm not a particularly great programmer, but would certainly be able to try my hand at writing some documentation, given an example or template to work from.
One quick question. what is the accepted way to make sorted navigation links loop around from back to front (i.e. if I'm looking at the last page, the "next" link points to the first page)? Ideally, I'm looking for some kind of Boolean setting in the sorter plugin:
sorter:
time:
loop: true
or, less elegantly, something akin to the prev_by_/next_by_ attributes (probably first_by_time/last_by_time) so I could employ my own logic, e.g.:
{% if resource.prev_by_time %}
{% set prev = resource.prev_by_time %}
{% else %}
{% set prev = resource.last_by_time %}
{% endif %}
<a class="prev" href="{{ content_url(prev.url) }}">
« {{ prev.meta.title }}
</a>
I had a look at the source and found the declarations for prev_by_/next_by_ but haven't been able to track down any setting for looping around from top to bottom and vice-versa. I also haven't figured out how to generate first_by_/last_by_ functions, but if anyone wants to take a crack at it, a good place to start would probably be in the last dozen or so lines of hyde/ext/plugins/sorter.py.
Also, if there's another way to do this that I haven't thought of, feel free to set me straight.
Thanks in advance for any help!
Cheers,
Jared