掲示板
put search box portlet in the theme
15年前 に Gabor Matyi によって更新されました。
put search box portlet in the theme
New Member 投稿: 9 参加年月日: 09/01/27 最新の投稿
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
15年前 に Gabor Matyi によって更新されました。
RE: put search box portlet in the theme
New Member 投稿: 9 参加年月日: 09/01/27 最新の投稿
please help me anybody.
thanks.
thanks.
15年前 に Archi Madhu によって更新されました。
RE: put search box portlet in the theme
Regular Member 投稿: 237 参加年月日: 08/03/25 最新の投稿Gabor 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
15年前 に Gabor Matyi によって更新されました。
RE: put search box portlet in the theme
New Member 投稿: 9 参加年月日: 09/01/27 最新の投稿
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...
14年前 に Zankar Shah によって更新されました。
RE: put search box portlet in the theme
Regular Member 投稿: 106 参加年月日: 07/10/03 最新の投稿
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
14年前 に Anne D C によって更新されました。
RE: put search box portlet in the theme
Junior Member 投稿: 32 参加年月日: 09/05/20 最新の投稿
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?
14年前 に zaheer mohammed saddapalli によって更新されました。
RE: put search box portlet in the theme
Regular Member 投稿: 165 参加年月日: 08/01/15 最新の投稿Gabor 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
14年前 に vcvijayan MCA によって更新されました。
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
14年前 に zaheer mohammed saddapalli によって更新されました。
RE: put search box portlet in the theme
Regular Member 投稿: 165 参加年月日: 08/01/15 最新の投稿vcvijayan 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.
9年前 に nitin kumar sharma によって更新されました。
RE: put search box portlet in the theme
New Member 投稿: 12 参加年月日: 13/04/26 最新の投稿vcvijayan 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...!
9年前 に Andew Jardine によって更新されました。
RE: put search box portlet in the theme
Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
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.
9年前 に prabhakar reddy によって更新されました。
RE: put search box portlet in the theme
New Member 投稿: 7 参加年月日: 13/08/01 最新の投稿
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,
11年前 に Krati Gupta によって更新されました。
RE: put search box portlet in the theme
Regular Member 投稿: 119 参加年月日: 08/12/05 最新の投稿
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 .
11年前 に Krati Gupta によって更新されました。
RE: put search box portlet in the theme
Regular Member 投稿: 119 参加年月日: 08/12/05 最新の投稿
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 ...
13年前 に amira princesse によって更新されました。
RE: put search box portlet in the theme
New Member 投稿: 7 参加年月日: 10/01/04 最新の投稿
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
11年前 に Krati Gupta によって更新されました。
RE: put search box portlet in the theme
Regular Member 投稿: 119 参加年月日: 08/12/05 最新の投稿
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
8年前 に Rajesh GR によって更新されました。
RE: put search box portlet in the theme
Regular Member 投稿: 161 参加年月日: 10/02/08 最新の投稿Krati 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.