Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] Excluding DIVs

From: Peter Karman <peter(at)>
Date: Wed Apr 18 2007 - 12:05:11 GMT scribbled on 4/18/07 5:40 AM:
> Good afternoon,
> I want to exclude contents contained within certain DIVs from being indexed,
> but I cannot manage to get it to work. I used
> as a guide and actually managed
> to get it to work with that particular example by adding IgnoreMetaTags
> div.product-authors, but in my real-life environment I simply cannot get it
> to work. It's probably something silly...
> It concerns the contents of our 'left navigation bar'. This is contained
> within <div id="inlnb">, so I added the following to the config:
> XMLClassAttributes id
> MetaNames div.inlnb
> IgnoreMetaTags div.inlnb

In parser.c it looks like XMLClassAttributes are evaluated after testing 
IgnoreMetaTags, so you can't configure it the way you have above. I.e., the 
parser checks if it should ignore a given tag based on the tag name, before it 
ever gets to the attributes.

That's probably a bug in the parser logic.

Anyway, an alternate solution would be just to wrap that particular div in the 
noindex comments:

  <!-- noindex -->
  <div id="inlnb">
  <!-- index -->

Peter Karman  .  .  peter(at)
Users mailing list
Received on Wed Apr 18 08:05:14 2007