Jump to content

Featured Replies

Posted

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.

  • Community Expert

You need a plugin to do it:

-- ATTACHMENT REMOVED --

 

Edited by Adriano Faria

  • Community Expert
11 minutes ago, Daniel F said:

That's a bad approach, instead of overriding the variable, it would be much better to override the getter method ( includeInSiteSearch() )

	public static function includeInSiteSearch()
	{
		return FALSE;
	}

in \IPS\cms\Pages\PageItem?

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.

  • Community Expert

I will update another plugin that does exactly the same. 👍

  • Community Expert
1 hour ago, Adriano Faria said:

You need a plugin to do it:

-- ATTACHMENT REMOVED --

 

@Gabriel Torres, I just submitted a fixed version to the markeplace:

 

  • Community Expert

Not yet. Still missing an update. In the meantime, youu can use the one I attached yesterday. 

  • Community Expert

The "products" search is pending; follow the file to get notified. Made the same change indicated by @Daniel F.

Recently Browsing 0

  • No registered users viewing this page.