Fórumok

Search Portlet default be set to “This site only”

thumbnail
Sai Mohan Gadamsetty, módosítva 9 év-val korábban

Search Portlet default be set to “This site only”

Junior Member Bejegyzések: 92 Csatlakozás dátuma: 2013.02.06. Legújabb bejegyzések
Hi Guys,

Can any one know how to set search default value to “This site only”. By default Liferay gives results to entire portal scope but I want this to only Site/Group scope.

Will it solve writing hook or any configurations do we have to do to change search portlet default value. Please advise any one how to go forward.

Thanks,

Sai Mohan
thumbnail
Pankaj Kathiriya, módosítva 9 év-val korábban

RE: Search Portlet default be set to “This site only”

Liferay Master Bejegyzések: 722 Csatlakozás dátuma: 2010.08.05. Legújabb bejegyzések
There isnt any configuration available, you can achieve this writing hook overriding search.jsp to select This site only option by default.
thumbnail
Sai Mohan Gadamsetty, módosítva 9 év-val korábban

RE: Search Portlet default be set to “This site only”

Junior Member Bejegyzések: 92 Csatlakozás dátuma: 2013.02.06. Legújabb bejegyzések
Thanks very much Pankaj for your quick reply.

Thanks,

Sai Mohan
thumbnail
Daniel Tyger, módosítva 7 év-val korábban

RE: Search Portlet default be set to “This site only”

Regular Member Bejegyzések: 105 Csatlakozás dátuma: 2013.02.06. Legújabb bejegyzések
Sai Mohan Gadamsetty:
Hi Guys,
Can any one know how to set search default value to “This site only”. By default Liferay gives results to entire portal scope but I want this to only Site/Group scope.


I had a need for this same thing but wanted to be able to apply it site > site or at a specific page... This Javascript could be added to the page or site level and achieve the same thing:

jQuery(document).ready(function($){
  $('select').find('option[value=6506604]').attr('selected','selected');
});


Where "6506604" is the value (groupId in Liferay) of the site you want the search to default to "This Site..."