Liferayは6年連続でGartner Magic Quadrantのリーダーに。 詳細はこちら

フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Path Finder LifeRay
disabling portlet borders and portlet topper toolbar
2011/05/23 23:35
答え

Path Finder LifeRay

ランク: Expert

投稿: 262

参加年月日: 2009/09/18

最近の投稿

Hi,
I need to disable portlet borders and portlet topper toolbar. Is there anyway to do it using css. I tried to disable portlet borders using xml file. But its thrown exceptions while deployment. I need these things ASAP. Suggestions are most welcome.

Thanks in advance,
Path Finder
Nilesh Gundecha
RE: disabling portlet borders and portlet topper toolbar
2011/05/24 0:09
答え

Nilesh Gundecha

ランク: Regular Member

投稿: 196

参加年月日: 2009/11/30

最近の投稿

Path Finder LifeRay:
Hi,
I need to disable portlet borders and portlet topper toolbar. Is there anyway to do it using css. I tried to disable portlet borders using xml file. But its thrown exceptions while deployment. I need these things ASAP. Suggestions are most welcome.

Thanks in advance,
Path Finder



Can you tell me which xml file you modified and whats the modification you did to achieve this?

All you need to do is just add the below tag in portlet.xml file, below the <portlet-info> tag and above the <security-role-ref> tag.
1<portlet-preferences>
2            <preference>
3            <name>portlet-setup-show-borders</name>
4            <value>false</value>
5            </preference>
6        </portlet-preferences>


So combined this will look like as below : -

 1<portlet-info>
 2            <title>ABCPortlet</title>
 3            <short-title>ABCPortlet</short-title>
 4            <keywords></keywords>
 5        </portlet-info>
 6        <portlet-preferences>
 7            <preference>
 8            <name>portlet-setup-show-borders</name>
 9            <value>false</value>
10            </preference>
11        </portlet-preferences>
12        <security-role-ref>
13            <role-name>administrator</role-name>
14        </security-role-ref>
15        <security-role-ref>
16            <role-name>guest</role-name>
17        </security-role-ref>
18        <security-role-ref>
19            <role-name>power-user</role-name>
20        </security-role-ref>
21        <security-role-ref>
22            <role-name>user</role-name>
23        </security-role-ref>
24    </portlet>


I doubt the exception what you must be getting while deployment must be because of the unsuccessful parsing of XML file. Just check the XML syntax correctness.

Hope this helps.

Regards,
Nilesh.
Path Finder LifeRay
RE: disabling portlet borders and portlet topper toolbar
2011/05/24 0:24
答え

Path Finder LifeRay

ランク: Expert

投稿: 262

参加年月日: 2009/09/18

最近の投稿

Hi Nilesh,
Thanx for your quick reply. I need the disabling for every portlet in my application. If I use your approach I have to do it for every portlet. right? I disabled the borders using <portlet-show-borders..> tag in liferay-look-and-feel.xml in our theme WEB-INF folder. I got it from the LR6 documentation.

Thanks in advance,
Path Finder
Nilesh Gundecha
RE: disabling portlet borders and portlet topper toolbar
2011/05/24 0:25
答え

Nilesh Gundecha

ランク: Regular Member

投稿: 196

参加年月日: 2009/11/30

最近の投稿

Whats the exception you are getting while deployment??
Corné Aussems
RE: disabling portlet borders and portlet topper toolbar
2011/05/24 1:03
答え

Corné Aussems

ランク: Liferay Legend

投稿: 1306

参加年月日: 2006/10/03

最近の投稿

For every portlet in your app you define it indeed in your themes's liferay-look-and-feel.xml

Make sure to place the settings where they are expected
1<look-and-feel>
2  ...
3  <theme .....>
4    <settings>
5      <setting key="portlet-setup-show-borders-default" value="false" />
6      ...
7    </settings>
8....
Path Finder LifeRay
RE: disabling portlet borders and portlet topper toolbar
2011/05/24 3:32
答え

Path Finder LifeRay

ランク: Expert

投稿: 262

参加年月日: 2009/09/18

最近の投稿

Hi corne,
Thanks for the reply. I did the same and deployed it. But it has given exception and theme dn't deployed at all. Is there only 1 solution for that or can we have any css modification to disable borders for portlets.

Thanks in advance,
Path Finder
Corné Aussems
RE: disabling portlet borders and portlet topper toolbar
2011/05/24 3:43
答え

Corné Aussems

ランク: Liferay Legend

投稿: 1306

参加年月日: 2006/10/03

最近の投稿

Please give full liferay-look-and-feel.xml and stacktrace of exception
Path Finder LifeRay
RE: disabling portlet borders and portlet topper toolbar
2011/05/24 5:16
答え

Path Finder LifeRay

ランク: Expert

投稿: 262

参加年月日: 2009/09/18

最近の投稿

Hi Corne,
The following is the code:
 1<?xml version="1.0"?>
 2<!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 6.0.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_6_0_0.dtd">
 3
 4<look-and-feel>
 5    <compatibility>
 6        <version>6.0.5+</version>
 7    </compatibility>
 8    <theme id="College" name="College">
 9    <template-extension>ftl</template-extension>
10    <settings>
11        <setting key="portlet-setup-show-borders-default" value="false" />
12    </settings>
13    </theme>
14</look-and-feel>

the following is the exception trace:
1The content of element type "theme" must match "(root-path?,templates-path?,css-path?,images-path?,javascript-path?,virtual-path?,template-extension?,settings?,wap-theme?,roles?,color-scheme*,layout-templates?)".


I followed LR6 documentation of themes.
Hope this suffice for explanation

Thanks in advance,
Path Finder
Corné Aussems
RE: disabling portlet borders and portlet topper toolbar
2011/05/24 7:14
答え

Corné Aussems

ランク: Liferay Legend

投稿: 1306

参加年月日: 2006/10/03

最近の投稿

I create a brand new Theme and put your xml code in it, without any problems it did deploy.

The error is about the xml not being valid according to dtd, and specifically to the <theme> entity;
But i can't see any errors in it.
Please try to cleanup webapps/ and work folder and redeploy again to make sure you are not looking at something different.
Path Finder LifeRay
RE: disabling portlet borders and portlet topper toolbar
2011/05/24 8:04
答え

Path Finder LifeRay

ランク: Expert

投稿: 262

参加年月日: 2009/09/18

最近の投稿

Hi Corne,
Thanks for your reply. I will make a shot at that and get back to you again.

Thanks in advance,
Path Finder
Dave Weitzel
RE: disabling portlet borders and portlet topper toolbar
2013/01/10 9:47
答え

Dave Weitzel

ランク: Regular Member

投稿: 201

参加年月日: 2009/11/18

最近の投稿

hi,
intercepting this thread as it seems the most recent on the topic of portlet titles.

I just want to hide the tile bar for journal content articles (portlet 56) in 6.1 CE.

Most of the content we have imported has its own heading/title as part of the content and customer wants to keep doing that,
I tried adding:
<portlet-preferences>
<preference>
<name>portlet-setup-show-borders</name>
<value>false</value>
</preference>
</portlet-preferences>
to both portlet-custom.xml and portlet-ext.xml and restarting site but new content displays still have the title bar.

Is there any other setting I can try? For instance can I set something in the init-ext.jsp for the ournal_content portlet?

There is a lot of content to import and also setting look and feel manually for new portlets is a lot of effort for something so trivial.