perl-docs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: sub-sections for searching
Date Thu, 31 Jan 2002 01:47:38 GMT
Bill Moseley wrote:

> 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 -->";


sure we can. Why do you need to add the <head> section though?

 
> 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.


I use HTML::Parser


> Anyway, would that <div> mess up formatting?


I have suggested before to add <!-- sections --> instead. That's the 
safes method, no?





-- 


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
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