How ton index with a menu call in every page ?

Come here for help or to post comments on Sphider
Post Reply
Equinoxe58
Posts: 14
Joined: Fri Oct 06, 2023 8:02 pm

How ton index with a menu call in every page ?

Post 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?
User avatar
captquirk
Site Admin
Posts: 299
Joined: Sun Apr 09, 2017 8:49 pm
Location: Arizona, USA
Contact:

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

Post 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.
Equinoxe58
Posts: 14
Joined: Fri Oct 06, 2023 8:02 pm

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

Post 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.
User avatar
captquirk
Site Admin
Posts: 299
Joined: Sun Apr 09, 2017 8:49 pm
Location: Arizona, USA
Contact:

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

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