Skip to main content.
home | support | download

Back to List Archive

Selective indexing of sections (was: How to install Perl

From: Bill Moseley <moseley(at)>
Date: Mon Jun 10 2002 - 17:30:40 GMT
At 09:58 AM 06/10/02 -0700, Jody Cleveland wrote:
>Is this how it would look on my page:
><!-- Swishcommand index -->
>	<div class="innercontent">
>		much content
>	</div>
><!-- Swishcommand noindex -->

No, that won't really work because the default is "index".  You would need
to turn it off before turning it back on.

>> Oh, libxml2 only.
>What exactly is this, and how do I set it up? I've looked through the
>documentation, and I'm not real clear. Being a Monday doesn't help either.

libxml2 or the above "noindex" comments?  For libxml2, if you are using the
Windows version it's built with libxml2.  For other platforms you read the
INSTALL doc.  Then you just say your document is to be parsed by HTML2 parser.

   IndexContents HTML2 .htm .html

As for the "noindex" tags.

It doesn't help that it's not documented.  That was added a while back but
I didn't document it because it's not a very standard way to do that -- if
there is such a standard way [Avi, what would you suggest?].

I'm also not so sure I like the implementation.  They have to be balanced
so, which could trip people up.

Normally what you might do is:

  <title>Some title</title>
<!-- Swishcommand noindex -->
<!-- Navigation starts here -->
<!-- Start content section -->
  <!-- Swishcommand index -->
  content text
  <!-- Swishcommand noindex -->
<!-- End content section -->

That will work well if you are building your pages with templates or
components, as you can wrap the various bits you don't want indexed in
those "noindex"/"index" commands.  e.g. wrap your sidebar menu in those
tags and it won't get indexed.

Since it has to be balanced you can't do this:

<!-- Swishcommand noindex -->
left navigation

 <!-- Swishcommand noindex -->
 right side of page header
     <!-- Swishcommand index -->
     content that will NOT get indexed
     because it's still within an out side "noindex"
     <!-- Swishcommand noindex -->

I could see that happening.  So what behavior would be expected.  That
"index" always enables indexing, regardless of how deeply nested it is?  Or
should things be balanced?

     <b>this is bold<b>so is this</b>should this be bold?</b>

It's like that, except that swish has the implicit start tag:


If you want full control over what is indexed on your site, and want to
select by tags (such as by a <div> tag) and can't easily add those comment
commands, then there's always something like this:

Bill Moseley
Received on Mon Jun 10 17:34:09 2002