perl-docs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Moseley <mose...@hank.org>
Subject sub-sections for searching
Date Wed, 30 Jan 2002 20:45:14 GMT
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:moseley@hank.org

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Mime
View raw message