I'm looking for a way to index sections individually.   What I'd like to do
is take a document, grab the <head> section, then combine it with each
section and index as if each one was it's own page.

Could we add a <div> for each section?

That is in the page_body template:

   # render the content
    "<!-- SwishCommand index -->";
    FOREACH sec = doc.body;
        '<div class="section">'
        sec;
        "<br><br>";
        IF loop.count == loop.size;
            INCLUDE navbar_local_bottom
                nav=doc.nav
                rel_doc_root=doc.dir.rel_doc_root;
        ELSE;
            INCLUDE top_link;
        END;
        "<br><br>";
        "</div>"
    END;
    "<!-- SwishCommand noindex -->";

The idea is then I could probably use HTML::TreeBuilder and grab each
section one-by-one, combine with the <head> for the entire page, and index
that.

I could also simply use a regex to split up the page, but TreeBuilder might
be more fun.

Anyway, would that <div> mess up formatting?
-- 
Bill Moseley
mailto:[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to