Jump to content

Disable the "Pages" option in the Search menu


Gabriel Torres
 Share

Recommended Posts

Hello,

I wish we had an option to disable the "Pages" ("Páginas", in our translation below) option in the search menu. As these fixed pages have no relevant content in our website, this option, being at the top, only creates clutter, taking up unecessary space.

image.png.1826edfca43faf57c3a2e465b54e92c9.png

Note that I've already suggested the same for Products, and here we ended up using a plugin developed by Adriano Faria based on my suggestion to achieve this. My original suggestion to disable Products from search remains! 🙂

 

Thanks,

Gabe.

Link to comment
Share on other sites

13 minutes ago, Adriano Faria said:
	public static function includeInSiteSearch()
	{
		return FALSE;
	}

in \IPS\cms\Pages\PageItem?

Yes.

Reason for this is that we're not using this variable anywhere except inside the getter method.
Other hooks could override the method too, we could literally change the code in the method and not use the variable at all or include some further logic  (e.g. take a look a the implementation in the Record class) so overriding the method will probably be much more future proof.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...