Foros de discusión
How to remove list of "everthing" and "this site" from search box portlet
Akash Jaisawal, modificado hace 12 años.
How to remove list of "everthing" and "this site" from search box portlet
Regular Member Mensajes: 141 Fecha de incorporación: 3/03/12 Mensajes recientes
Hie everyone
I just want to remove the list "everthing" and "this site" from search box portlet. WHat should i do ............ ????
I just want to remove the list "everthing" and "this site" from search box portlet. WHat should i do ............ ????
Tejas Kanani, modificado hace 12 años.
RE: How to remove list of "everthing" and "this site" from search box port
Liferay Master Mensajes: 654 Fecha de incorporación: 6/01/09 Mensajes recientes
Hi Akash Jaisawal,
It is defining the scope of search. Whether you want to search within current community or entire communities available in Liferay instance.
If you want to remove it, you'll have to decide what will be your default scope for search.
Have a look at in html\portlet\search\search.jsp & create hook and make necessary changes in that file.
If you check below code from search.jsp
On basis of selection, it is storing groupId value. So if you select Everything its storing 0 and if you select this community/organization it will store respective community/organization's Id.
HTH.
Thanks,
Tejas
It is defining the scope of search. Whether you want to search within current community or entire communities available in Liferay instance.
If you want to remove it, you'll have to decide what will be your default scope for search.
Have a look at in html\portlet\search\search.jsp & create hook and make necessary changes in that file.
If you check below code from search.jsp
<aui:select inlinefield="<%= true %>" label="" name="groupId">
<aui:option label="everything" selected="<%= groupId == 0 %>" value="0" />
<aui:option label="<%= "this-" + (group.isOrganization() ? "organization" : "site") %>" selected="<%= groupId != 0 %>" value="<%= group.getGroupId() %>" />
</aui:select>
On basis of selection, it is storing groupId value. So if you select Everything its storing 0 and if you select this community/organization it will store respective community/organization's Id.
HTH.
Thanks,
Tejas