Page 1 of 1

How ton index with a menu call in every page ?

Posted: Sun Mar 03, 2024 11:09 am
by Equinoxe58
Good morning,
I have a problem that I can't solve for indexing.
I explain to you :
On my site, I have an horizontal drop-down menu which is called on each page by a "require" integrated into my header like this: require_once( ROOT_PATH_LINK.'menu/index.php' );
My problem is that this menu is indexed to each link taken into account by Sphider. You follow me ?
Which means that in my sphider_links table, in the fulltxt column, I have all the words in my menu for each link. Example: "La ville La Mairie Les bulletins municipaux Les transports La navette 'Coeur de ville' Voyager avec Mobigo Les associations La bibliothèque municipale ...."
So if I search for transports for example, I will find it in all the links on the site even if it is not in the link concerned.
And I don't see how to get around this problem. Do you have an idea please?

Re: How ton index with a menu call in every page ?

Posted: Sun Mar 03, 2024 7:34 pm
by captquirk
Look at the Sphider User Guide, page 47. Method 4 describes how to prevent certain parts of a page from being indexed:
Method 4 - Ignoring parts of a page
Sphider includes an option to exclude parts of pages from being indexed. This can, for example,
be used to prevent search result flooding when certain keywords appear on certain part in most
pages (like a header, footer or a menu). Any part of a page between
<!--sphider_noindex--> and <!--/sphider_noindex--> tags is not indexed, however links in it
are followed.
Use these tags around the menu.

Re: How ton index with a menu call in every page ?

Posted: Mon Mar 04, 2024 6:50 pm
by Equinoxe58
Good evening,
I did as you told me by adding the 2 non-indexing tags and it works perfectly. And to think that I had the solution before my eyes but that I could not see it. I hadn't read the documentation, it was a mistake on my part. In any case, thank you once again for your help.

Re: How ton index with a menu call in every page ?

Posted: Tue Mar 05, 2024 2:23 am
by captquirk
I had the solution before my eyes but that I could not see it.
LOL! Welcome to the club! I have been in that situation more times than I can count.