Fórumok
put search box portlet in the theme
Gabor Matyi, módosítva 15 év-val korábban
put search box portlet in the theme
New Member Bejegyzések: 9 Csatlakozás dátuma: 2009.01.27. Legújabb bejegyzések
Hi!
I'd like to put a searchbox portlet in my theme.
I put this line to the portal_normal.vm
$taglibLiferay.runtime("3_INSTANCE_zzzz", "", "<portlet-preferences><preference><name>portlet-setup-show-borders</name><value>false</value></preference></portlet-preferences>")
I don't get any searbox, but I get twice
"Search - Look and Feel - Configuration"
Search - Look and Feel - Configuration
and I see once this text.
You do not have the roles required to access this portlet.
Could anybody please help me, what do I wrong?
Thanks Gabor Matyi
I'd like to put a searchbox portlet in my theme.
I put this line to the portal_normal.vm
$taglibLiferay.runtime("3_INSTANCE_zzzz", "", "<portlet-preferences><preference><name>portlet-setup-show-borders</name><value>false</value></preference></portlet-preferences>")
I don't get any searbox, but I get twice
"Search - Look and Feel - Configuration"
Search - Look and Feel - Configuration
and I see once this text.
You do not have the roles required to access this portlet.
Could anybody please help me, what do I wrong?
Thanks Gabor Matyi
Gabor Matyi, módosítva 15 év-val korábban
RE: put search box portlet in the theme
New Member Bejegyzések: 9 Csatlakozás dátuma: 2009.01.27. Legújabb bejegyzések
please help me anybody.
thanks.
thanks.
Archi Madhu, módosítva 15 év-val korábban
RE: put search box portlet in the theme
Regular Member Bejegyzések: 237 Csatlakozás dátuma: 2008.03.25. Legújabb bejegyzésekGabor Matyi:
please help me anybody.
thanks.
Hi,
you can incluse searchbox portlet in theme by
$velocityPortletPreferences.setValue("portlet-setup-show-borders", "false")
$theme.runtime("56_INSTANCE_a123", "", $velocityPortletPreferences.toString())
$velocityPortletPreferences.reset()
Replace 56_INSTANCE_a123 with your search box portlet id
Regards,
Archi Madhua
Gabor Matyi, módosítva 15 év-val korábban
RE: put search box portlet in the theme
New Member Bejegyzések: 9 Csatlakozás dátuma: 2009.01.27. Legújabb bejegyzések
Thanks you help.
your solution works with 56_INSTANCE_...., but not with 3_INSTANCE....
what I need: to put a searchbox in the template ... you see similar on the site liferay.com.
Probably there is any issue with including this portlet...
your solution works with 56_INSTANCE_...., but not with 3_INSTANCE....
what I need: to put a searchbox in the template ... you see similar on the site liferay.com.
Probably there is any issue with including this portlet...
Zankar Shah, módosítva 14 év-val korábban
RE: put search box portlet in the theme
Regular Member Bejegyzések: 106 Csatlakozás dátuma: 2007.10.03. Legújabb bejegyzések
Try this out
<div class="search">
$theme.journalContentSearch()
</div>
Not sure may be it is internally doing the same thing which is written in forum.
This is in one of the liferay-noir theme. Check that for reference
<div class="search">
$theme.journalContentSearch()
</div>
Not sure may be it is internally doing the same thing which is written in forum.
This is in one of the liferay-noir theme. Check that for reference
Anne D C, módosítva 14 év-val korábban
RE: put search box portlet in the theme
Junior Member Bejegyzések: 32 Csatlakozás dátuma: 2009.05.20. Legújabb bejegyzések
Thanks, that works just fine! Even thought I'm working with Liferay 4.3.2
My only question is: The search button (an input as I can see at the source code) appears as a magnifying glass, how can I change it to a simple button?
I proved through CSS using the input tag, but it didn't work.
Any idea?
My only question is: The search button (an input as I can see at the source code) appears as a magnifying glass, how can I change it to a simple button?
I proved through CSS using the input tag, but it didn't work.
Any idea?
zaheer mohammed saddapalli, módosítva 14 év-val korábban
RE: put search box portlet in the theme
Regular Member Bejegyzések: 165 Csatlakozás dátuma: 2008.01.15. Legújabb bejegyzésekGabor Matyi:
Hi!
I'd like to put a searchbox portlet in my theme.
I put this line to the portal_normal.vm
$taglibLiferay.runtime("3_INSTANCE_zzzz", "", "<portlet-preferences><preference><name>portlet-setup-show-borders</name><value>false</value></preference></portlet-preferences>")
I don't get any searbox, but I get twice
"Search - Look and Feel - Configuration"
Search - Look and Feel - Configuration
and I see once this text.
You do not have the roles required to access this portlet.
Could anybody please help me, what do I wrong?
Thanks Gabor Matyi
Hi Gabor,
I have added my custom search portlet inn theme.
#set ($km_search_portlet_url = $portletURLFactory.create($request, "KWA_11", $page.getPlid(), "RENDER_PHASE"))
$km_search_portlet_url.setWindowState("maximized")
$km_search_portlet_url.setPortletMode("view")
$km_search_portlet_url.setParameter("struts_action", "/ext/km_search/search")
and then add following code
<form id="site_search_form" action="$km_search_portlet_url" method="post" name="_3_fm" onsubmit="submitForm(this); return false;">
<input type="text" id="site_search" name="_KWA_11_keywords" value="Site search">
</form>
This is best way for adding any portlet into theme
vcvijayan MCA, módosítva 14 év-val korábban
Hi Vijayan,
You are right for adding existing search portlet on theme.
Here i am talking about adding custom search.
anyway thanks for you post.
S Mohammed Zaheer
Senior Software Developer,
mohammed.zaheer@infoaxon.com
Infoaxon Technologies.
Thanks
I am stuck with same problem it works fine for me...
please keep sharing...!
RE: put search box portlet in the theme
zaheer mohammed saddapalli, módosítva 14 év-val korábban
RE: put search box portlet in the theme
Regular Member Bejegyzések: 165 Csatlakozás dátuma: 2008.01.15. Legújabb bejegyzésekvcvijayan MCA:
Hi Zaheer,
Incude the following line in you portlet.vm file or in any .vm file you will get search box.
$theme.journalContentSearch()
Thanks in Advance,
V.C.Vijayan
Software Developer, TransIT mPower Labs (P) Ltd.
info@mpowerglobal.com
mPower Global Inc.
A Liferay expert company.
Hi Vijayan,
You are right for adding existing search portlet on theme.
Here i am talking about adding custom search.
anyway thanks for you post.
S Mohammed Zaheer
Senior Software Developer,
mohammed.zaheer@infoaxon.com
Infoaxon Technologies.
nitin kumar sharma, módosítva 9 év-val korábban
RE: put search box portlet in the theme
New Member Bejegyzések: 12 Csatlakozás dátuma: 2013.04.26. Legújabb bejegyzésekvcvijayan MCA:
Hi Zaheer,
Incude the following line in you portlet.vm file or in any .vm file you will get search box.
$theme.journalContentSearch()
Thanks in Advance,
V.C.Vijayan
Software Developer, TransIT mPower Labs (P) Ltd.
info@mpowerglobal.com
mPower Global Inc.
A Liferay expert company.
Thanks
I am stuck with same problem it works fine for me...
please keep sharing...!
Andew Jardine, módosítva 9 év-val korábban
RE: put search box portlet in the theme
Liferay Legend Bejegyzések: 2416 Csatlakozás dátuma: 2010.12.22. Legújabb bejegyzések
Just in case anyone comes across this and is looking for a FEDERATED search and not the Web Content Search, you can add the "Search" portlet using $theme.search(); .. I feel like there was also a macro (in velocity) -- something like #search() but I may be mistaken.
prabhakar reddy, módosítva 9 év-val korábban
RE: put search box portlet in the theme
New Member Bejegyzések: 7 Csatlakozás dátuma: 2013.08.01. Legújabb bejegyzések
Hi All,
I want to display the searched content in other specific page which i created for searched content. how to pass page url to this $theme.search().
Thanks,
I want to display the searched content in other specific page which i created for searched content. how to pass page url to this $theme.search().
Thanks,
Krati Gupta, módosítva 11 év-val korábban
RE: put search box portlet in the theme
Regular Member Bejegyzések: 119 Csatlakozás dátuma: 2008.12.05. Legújabb bejegyzések
Hi,
Your Code works for me but some error , it will be great if u help me in my issue also , the following is the issue :
My Code :
#set ($tabs1URL = $portletURLFactory.create($request, "ABC", $page.getPlid(), "RENDER_PHASE"))
$tabs1URL.setWindowState("maximized")
$tabs1URL.setPortletMode("view")
$tabs1URL.setParameter("tabs1","Basic")
$tabs1URL.setParameter("struts_action", "/ABC/viewSearch")
<form id="fm" action="$tabs1URL" method="post" name="ABC" onsubmit="submitForm(this); return false;">
<input type="textbox" style="height: 24px; width: 200px;" id="uname1" name="uname1" value="People Search" onFocus="if (this.value == 'People Search') { this.value = ''; }" />
<input type="hidden" name="flag" id="flag" value="true"/>
<input type="submit" id="nsubmit" name="nsubmit" value="Search" />
</form>
By applying above code in theme my custom search textbox is coming in theme, but when I search any keyword its show only one result which I have searched from People Search Module .as per my debugging my struts_action is not calling , when i am searching from theme text box .
Your Code works for me but some error , it will be great if u help me in my issue also , the following is the issue :
My Code :
#set ($tabs1URL = $portletURLFactory.create($request, "ABC", $page.getPlid(), "RENDER_PHASE"))
$tabs1URL.setWindowState("maximized")
$tabs1URL.setPortletMode("view")
$tabs1URL.setParameter("tabs1","Basic")
$tabs1URL.setParameter("struts_action", "/ABC/viewSearch")
<form id="fm" action="$tabs1URL" method="post" name="ABC" onsubmit="submitForm(this); return false;">
<input type="textbox" style="height: 24px; width: 200px;" id="uname1" name="uname1" value="People Search" onFocus="if (this.value == 'People Search') { this.value = ''; }" />
<input type="hidden" name="flag" id="flag" value="true"/>
<input type="submit" id="nsubmit" name="nsubmit" value="Search" />
</form>
By applying above code in theme my custom search textbox is coming in theme, but when I search any keyword its show only one result which I have searched from People Search Module .as per my debugging my struts_action is not calling , when i am searching from theme text box .
Krati Gupta, módosítva 11 év-val korábban
RE: put search box portlet in the theme
Regular Member Bejegyzések: 119 Csatlakozás dátuma: 2008.12.05. Legújabb bejegyzések
Hi All,
I found the solution of my problem :
I have to replace this #set ($tabs1URL = $portletURLFactory.create($request, "ABC", $page.getPlid(), "RENDER_PHASE"))
to this ---- #set($tabs1URL = $portletURLFactory.create($request, "ABC", $page.getPlid(), "ACTION_PHASE"))
and after that its start working for me ...
I found the solution of my problem :
I have to replace this #set ($tabs1URL = $portletURLFactory.create($request, "ABC", $page.getPlid(), "RENDER_PHASE"))
to this ---- #set($tabs1URL = $portletURLFactory.create($request, "ABC", $page.getPlid(), "ACTION_PHASE"))
and after that its start working for me ...
amira princesse, módosítva 13 év-val korábban
RE: put search box portlet in the theme
New Member Bejegyzések: 7 Csatlakozás dátuma: 2010.01.04. Legújabb bejegyzések
I have also the same problème
i've created a custom search portlet that I wish to includ in the top of the theme.
this is the VM code
and when click on the search buttom of my portlet I get :
You do not have the roles required to access this portlet.
could any of you help me plz
i've created a custom search portlet that I wish to includ in the top of the theme.
this is the VM code
<div class="search_input">
#set ($myPlaceURL = $portletURLFactory.create($request, "customsearch_WAR_CustomSearchportlet_INSTANCE_abcd", $getterUtil.getLong($plid), "RENDER_PHASE"))
${myPlaceURL.setWindowState("maximized")}
${myPlaceURL.setPortletMode("view")}
${myPlaceURL.setParameter("javax.portlet.action", "doSearch")}
<form action="${myPlaceURL.toString()}" method="post" id="customsearch_WAR_CustomSearchportlet_INSTANCE_abcd_fm">
<input type="text" name="customsearch_WAR_CustomSearchportlet_INSTANCE_abcd_search" id="customsearch_WAR_CustomSearchportlet_INSTANCE_abcd_search">
<input type="submit" value="Search">
</form>
</div>
and when click on the search buttom of my portlet I get :
You do not have the roles required to access this portlet.
could any of you help me plz
Krati Gupta, módosítva 11 év-val korábban
RE: put search box portlet in the theme
Regular Member Bejegyzések: 119 Csatlakozás dátuma: 2008.12.05. Legújabb bejegyzések
Hi Amira,
By seeing your code their some error which are as below:
changed this ------ ${myPlaceURL.setParameter("javax.portlet.action", "doSearch")} to ${myPlaceURL.setParameter(("struts_action", "("struts_action", "/abc/view")}
and action="${myPlaceURL.toString()} to action="$myPlaceURL
By seeing your code their some error which are as below:
changed this ------ ${myPlaceURL.setParameter("javax.portlet.action", "doSearch")} to ${myPlaceURL.setParameter(("struts_action", "("struts_action", "/abc/view")}
and action="${myPlaceURL.toString()} to action="$myPlaceURL
Rajesh GR, módosítva 8 év-val korábban
RE: put search box portlet in the theme
Regular Member Bejegyzések: 161 Csatlakozás dátuma: 2010.02.08. Legújabb bejegyzésekKrati Gupta:
Hi Amira,
By seeing your code their some error which are as below:
changed this ------ ${myPlaceURL.setParameter("javax.portlet.action", "doSearch")} to ${myPlaceURL.setParameter(("struts_action", "("struts_action", "/abc/view")}
and action="${myPlaceURL.toString()} to action="$myPlaceURL
Hi Krati Gupta,
I m trying to get the attribute value "userName" from the custom portlet placed in Theme header part in portal_normal.vm file. Can somebody please suggest me the approach to handle this,
In Portal_normal.vm:
${tabs1URL.setWindowState("maximized")}
${tabs1URL.setPortletMode("view")}
${tabs1URL.setParameter("tabs1","Basic")}
${tabs1URL.setParameter("javax.portlet.action", "getUsernameDetails")}
<input type="text" name="userName" id="userName" class="form-control height30px searchtextBox" placeholder="Search User Name" />
<button type="submit" value="" alt="SomeAlternateText"></button>
In Controller:
public void getUsernameDetails(ActionRequest actionRequest,
ActionResponse actionResponse) throws IOException, PortletException {
String userName= ParamUtil
.getString(actionRequest, "userName");
Thanks In Advance,
Regards,
Rajesh.