RE: Titles of Web Content Display portlets show all the time - 7.2 DXP

Diane Jones, modified 6 Years ago. New Member Posts: 6 Join Date: 1/15/19 Recent Posts
I've attached a screenshot showing my Liferay DXP 7.2 site. I have a content piece with the title "New Slideshow with Captions" - that is my 'internal' name for that content piece, and I do not want end users to see that name/title. Please tell me how I can remove this - is there a config setting for it? Thank you, Diane
thumbnail
Mohammed Yasin, modified 6 Years ago. Liferay Master Posts: 593 Join Date: 8/8/14 Recent Posts
Hi,
You can hide the title by css or by overriding the jsp
 You can use the below css with updating your instanceid
#portlet_com_liferay_journal_content_web_portlet_JournalContentPortlet_INSTANCE_t37Pt5SMrv07 {
    .portlet-title-text portlet-title-editable {display:none;}
}
thumbnail
Andrew Jardine, modified 6 Years ago. Liferay Legend Posts: 2416 Join Date: 12/22/10 Recent Posts
Hiding with CSS is definitely an option and for a time was one of the only options, but starting in 7.0, Liferay introduce Portlet Decorators for this sort of a thing. You can use them to control whether or not the portlet titles appear. Have a look at the classic theme. Go to the Look and Feel option from the portlet menu option and I think the item you are looking for is called "Barebone". You can also create your own portlet decorators if you have some other standard framing (spacing, titles, colour, etc) you want to use. You can also control the default decocrator that is used when a portlet is added to a page to save you doing the same configuration over and over again via a portal-ext.properties setting


#
# Set the default portlet decorator CSS class.
#
# Env: LIFERAY_DEFAULT_PERIOD_PORTLET_PERIOD_DECORATOR_PERIOD_CSS_PERIOD_CLASS
#
default.portlet.decorator.css.class=decorate