Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Path Finder LifeRay
disabling portlet borders and portlet topper toolbar
23 de mayo de 2011 23:35
Respuesta

Path Finder LifeRay

Ranking: Expert

Mensajes: 262

Fecha de incorporación: 18 de septiembre de 2009

Mensajes recientes

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
24 de mayo de 2011 0:09
Respuesta

Nilesh Gundecha

Ranking: Regular Member

Mensajes: 191

Fecha de incorporación: 30 de noviembre de 2009

Mensajes recientes

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
24 de mayo de 2011 0:24
Respuesta

Path Finder LifeRay

Ranking: Expert

Mensajes: 262

Fecha de incorporación: 18 de septiembre de 2009

Mensajes recientes

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
24 de mayo de 2011 0:25
Respuesta

Nilesh Gundecha

Ranking: Regular Member

Mensajes: 191

Fecha de incorporación: 30 de noviembre de 2009

Mensajes recientes

Whats the exception you are getting while deployment??
Corné Aussems
RE: disabling portlet borders and portlet topper toolbar
24 de mayo de 2011 1:03
Respuesta

Corné Aussems

Ranking: Liferay Legend

Mensajes: 1279

Fecha de incorporación: 3 de octubre de 2006

Mensajes recientes

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
24 de mayo de 2011 3:32
Respuesta

Path Finder LifeRay

Ranking: Expert

Mensajes: 262

Fecha de incorporación: 18 de septiembre de 2009

Mensajes recientes

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
24 de mayo de 2011 3:43
Respuesta

Corné Aussems

Ranking: Liferay Legend

Mensajes: 1279

Fecha de incorporación: 3 de octubre de 2006

Mensajes recientes

Please give full liferay-look-and-feel.xml and stacktrace of exception
Path Finder LifeRay
RE: disabling portlet borders and portlet topper toolbar
24 de mayo de 2011 5:16
Respuesta

Path Finder LifeRay

Ranking: Expert

Mensajes: 262

Fecha de incorporación: 18 de septiembre de 2009

Mensajes recientes

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
24 de mayo de 2011 7:14
Respuesta

Corné Aussems

Ranking: Liferay Legend

Mensajes: 1279

Fecha de incorporación: 3 de octubre de 2006

Mensajes recientes

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
24 de mayo de 2011 8:04
Respuesta

Path Finder LifeRay

Ranking: Expert

Mensajes: 262

Fecha de incorporación: 18 de septiembre de 2009

Mensajes recientes

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
10 de enero de 2013 9:47
Respuesta

Dave Weitzel

Ranking: Regular Member

Mensajes: 190

Fecha de incorporación: 18 de noviembre de 2009

Mensajes recientes

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.