Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Alain Dresse
Abstract view for blogs in 6.1 GA1
January 31, 2012 7:54 AM
Answer

Alain Dresse

Rank: Junior Member

Posts: 95

Join Date: July 18, 2011

Recent Posts

Hi,

I am using the 6.1 GA1 release of liferay, and I have questions on the blog display.

In 6.0.6, when a blog post had no description, the abstract view of the blog post (portlet configuration, display settings, display style set to abstracts) would display the first lines of the blog post before the "Read more" link.

In 6.1 GA1, this seems no longer to be the case - i.e. the "abstract view" and the "Title view" are identical for blog posts that have an empty description field. Is this something that can be changed in the control panel or in the portal-ext.properties ?

I added the line
blogs.page.abstract.length=400
to my portal-ext.properties, but that didn't change anything.

Best regards,
Alain
Sergio González
RE: Abstract view for blogs in 6.1 GA1
February 1, 2012 3:47 AM
Answer

Sergio González

LIFERAY STAFF

Rank: Expert

Posts: 280

Join Date: January 7, 2010

Recent Posts

Hi Alain,

That behaviour was changed in the following tickets: LPS-23686 and LPS-23692.

If you want a different behaviour you can change that using a Hook and modifying view_entry_content.jsp inside the blogs folder and the following lines (they should be around line 137):

<c:when test='<%= pageDisplayStyle.equals(RSSUtil.DISPLAY_STYLE_ABSTRACT) && !strutsAction.equals("/blogs/view_entry") %>'>
<%= StringUtil.shorten(HtmlUtil.stripHtml(entry.getDescription()), pageAbstractLength) %>

and use the following:

<c:when test='<%= pageDisplayStyle.equals(RSSUtil.DISPLAY_STYLE_ABSTRACT) && !strutsAction.equals("/blogs/view_entry") %>'>
<%= StringUtil.shorten(HtmlUtil.stripHtml(entry.getContent()), pageAbstractLength) %>

Hope it helps emoticon
Alain Dresse
RE: Abstract view for blogs in 6.1 GA1
February 1, 2012 4:07 AM
Answer

Alain Dresse

Rank: Junior Member

Posts: 95

Join Date: July 18, 2011

Recent Posts

Thanks Sergio !

I understand the logic. I do however have a couple follow-up questions:

  • Shouldn't the behaviour be consistent with the asset publisher, which still uses the first n characters of the content if the description is empty ?
  • Shouldn't the description field be longer ? I can barely get one sentence in it...


Happy to post an entry in Jira if you think it's useful.

Best regards,
Alain
Sergio González
RE: Abstract view for blogs in 6.1 GA1
February 1, 2012 7:07 AM
Answer

Sergio González

LIFERAY STAFF

Rank: Expert

Posts: 280

Join Date: January 7, 2010

Recent Posts

Hi Alain,

I have told Máté about this (he's the one who did that change), so he will reply here and let you know the reasons so you can discuss them.
Thanks for your interest emoticon
Máté Thurzó
RE: Abstract view for blogs in 6.1 GA1
February 2, 2012 2:25 AM
Answer

Máté Thurzó

LIFERAY STAFF

Rank: New Member

Posts: 5

Join Date: January 28, 2011

Recent Posts

Hi Alain,

It's indeed inconsistent between the asset publisher and blogs, and it would be nice to have that fallback, if the abstract is empty. If you don't mind you can go ahead and open a ticket in Jira for this, then assign to me, and I'll work on that.
The same applies for the description problem, you can open up a Jira ticket for that one as well, and assign to me.

Thank you very much for your help!

Máté
Alain Dresse
RE: Abstract view for blogs in 6.1 GA1
February 2, 2012 4:53 AM
Answer

Alain Dresse

Rank: Junior Member

Posts: 95

Join Date: July 18, 2011

Recent Posts

Hi Máté,

I created LPS-25277 and LPS-25278, but cannot assign them to you.

Best regards,
Alain
Máté Thurzó
RE: Abstract view for blogs in 6.1 GA1
February 2, 2012 6:24 AM
Answer

Máté Thurzó

LIFERAY STAFF

Rank: New Member

Posts: 5

Join Date: January 28, 2011

Recent Posts

Hi Alain,

Thanks for doing it so. I've assigned them to myself, and I'll address those tickets soon.

Thanks,

Máté
Mazhar Alam
RE: Abstract view for blogs in 6.1 GA1
September 18, 2012 3:28 AM
Answer

Mazhar Alam

Rank: Regular Member

Posts: 201

Join Date: November 25, 2011

Recent Posts

Thanks!!! It helps..