Hi,

I recently decided to deliberately improve my Racket code by studying 
well-written code, reverse engineering the program or library and 
documenting what I've learnt in a Pollen book. I'm trying to add a table of 
contents based on a nested pagetree. For now, I would just like it to show 
the children of the root node, minus the page with the TOC itself 
(index.html).

My index.ptree looks like this:

index.html
introduction.html
◊parenlog/parenlog.html{
 parenlog/introduction.html
 parenlog/predicates_variables_and_unification.html
}
glossary.html

In pollen.rkt, right now I've got:

(define (toc)
  (txexpr
   'ul
   '((class "toc"))
   (map (λ (pn) `(li (a ((href ,(symbol->string pn))) ,(select 'h1 pn))))
        (next* 'index.html (get-pagetree "index.ptree")))))
(provide toc)

That allows me to load index.html, but it contains 
parenlog/introduction.html as well as 
parenlog/predicates_variables_and_unification.html. 
I'd prefer to use siblings instead of next* and remove index.html, but for 
some reason index.html isn't served when I do that. I don't get an error 
message - the page just hangs in my browser. Are there special restrictions 
on what you can do with a pagetree in pollen.rkt?

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to