Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
lutz Bremen
!!Customize Search Portlet!!
June 1, 2012 1:25 AM
Answer

lutz Bremen

Rank: Expert

Posts: 291

Join Date: October 20, 2011

Recent Posts

Guys i really need your help.

i got this form in the theme

1<form method="GET" action="/web/kafer-edv/suche">
2    <input type="text" name="vorname" id="vorname" size="25">
3  </p>
4  <p><input type="submit" value="Suche"></p>
5</form>


and the text that i type in should be transefered to the searchportlet. i know that the form in the search.jsp is like this
 1<aui:fieldset>
 2        <aui:input inlineField="<%= true %>" label="" name="keywords" size="30" value="<%= keywords %>" />
 3
 4        <aui:select inlineField="<%= true %>" label="" name="groupId">
 5            <aui:option label="everything" selected="<%= groupId == 0 %>" value="0" />
 6            <aui:option label='<%= "this-" + (group.isOrganization() ? "organization" : "site") %>' selected="<%= groupId != 0 %>" value="<%= group.getGroupId() %>" />
 7        </aui:select>
 8
 9        <aui:button align="absmiddle" border="0" name="search" onClick='<%= renderResponse.getNamespace() + "search();" %>' src='<%= themeDisplay.getPathThemeImages() + "/common/search.png" %>' title="search" type="image" />
10
11        <portlet:renderURL var="clearSearchURL" copyCurrentRenderParameters="<%= false %>">
12            <portlet:param name="groupId" value="0" />
13        </portlet:renderURL>
14
15        <aui:button align="absmiddle" border="0" href="<%= clearSearchURL %>" name="clear-search" src='<%= themeDisplay.getPathThemeImages() + "/common/undo.png" %>' title="clear-search" type="image" />
16    </aui:fieldset>


but how do i get my word into the search.

PLEASE i need a fast answer.

im using the latest liferay version with tomcat.
and im not the best programmer so a code example would be nice

thanks in advance
Chintan Akhani
RE: !!Customize Search Portlet!!
June 1, 2012 2:47 AM
Answer

Chintan Akhani

Rank: Regular Member

Posts: 111

Join Date: March 13, 2008

Recent Posts

Hi lutz Bremen,

If you want to include search portlet in theme than you can achieve it without search related changes. Please let me know if it is the case.

Thanks,
Chintan
lutz Bremen
RE: !!Customize Search Portlet!!
June 1, 2012 2:58 AM
Answer

lutz Bremen

Rank: Expert

Posts: 291

Join Date: October 20, 2011

Recent Posts

if this is an option too it would be nice but if i include the search portlet in my header it shows the searchresult also in the header and thats crap.
i want it like this
Attachment

Attachments: Unbenannt.png (15.1k)
Sergio Romero
RE: !!Customize Search Portlet!!
June 1, 2012 4:43 AM
Answer

Sergio Romero

Rank: Regular Member

Posts: 148

Join Date: April 14, 2008

Recent Posts

Very nice your picture !!

You have to make a portlet search results, with "public render parameter". You can send the action from your header in this portlet search results.

PD. excuse my English, it is Google who translates for me!. emoticon
lutz Bremen
RE: !!Customize Search Portlet!!
June 1, 2012 5:36 AM
Answer

lutz Bremen

Rank: Expert

Posts: 291

Join Date: October 20, 2011

Recent Posts

puh that sound complicated. is there any example?
Hitoshi Ozawa
RE: !!Customize Search Portlet!!
June 1, 2012 5:42 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

A little bit of an old thread but may help you get started:

http://www.liferay.com/community/forums/-/message_boards/message/6036582
lutz Bremen
RE: !!Customize Search Portlet!!
June 1, 2012 5:59 AM
Answer

lutz Bremen

Rank: Expert

Posts: 291

Join Date: October 20, 2011

Recent Posts

ok. so its easier to solve it by editing the search portlets view? it should not be shown up in the head. the results ahve to be in the content
Deepjyoti Nath
RE: !!Customize Search Portlet!!
July 19, 2012 9:58 AM
Answer

Deepjyoti Nath

Rank: Junior Member

Posts: 81

Join Date: November 1, 2010

Recent Posts

You can add below entry in portal_normal.vm file inside the theme.
$theme.search()
fouad fouad
RE: !!Customize Search Portlet!!
June 9, 2015 8:50 AM
Answer

fouad fouad

Rank: Junior Member

Posts: 28

Join Date: August 8, 2014

Recent Posts

dear chintan, others emoticon

i noticed in different posts that ur advising on how to change the default text in a search portlet.
however i still couldnt successfully accomplish it.
could you please write in detail what should i do to change the default text of the search portlet.


thank you