> On Feb 28, 2019, at 6:42 AM, Brendan Stromberger 
> <brendanstromber...@gmail.com> wrote:
> 
> I can't seem to get next/previous navigation working. When I use `◊(previous 
> here)` and `◊(next here)`
> for my nav links, they evaluate to blank strings. `◊|here|` correctly 
> evaluates (as far as I can tell) to the current doc path.

`here-path` is a source path, but `here` is an output path. So if you're going 
to rely on `here` as the input to navigation functions, the pagetree must also 
contain output filenames. 

(This point was a little ambiguous in the docs that introduce `here`, so I've 
pushed a clarification.)

In this case, your pagetree contains source names, so `here` (as an output 
name) is not found, and `(next here)` and `(previous here)` evaluate to #f, 
which are both rendered as empty strings.

That said, you can use source names in the pagetree. In a `poly` project that 
may be the better idea. But if so, you need to do a little more housekeeping in 
your template files:

1) Instead of `here`, you'd want to pass `(hash-ref metas 'here-path)` to your 
pagetree function.

2) The result will be a source path, so you'd want to use `->output-path` to 
convert it to a usable output navigation link.

Separately, if you're including subdirectories in your pagetree, you need to be 
mindful of absolute vs relative pathnames. For instance, if the browser is 
visiting "front/cover.html" and links to the relative URL 
"front/author_note.html", then it will try to go to 
"front/front/author_note.html" (which doesn't exist). The simple solution is to 
make all your pagetree paths start from the project root, and in the template, 
stick with absolute URLs (that is, always prefix links in URLs with "/"). 

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to