Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Cipriano Teibão
Show part of an article
February 4, 2013 11:01 AM
Answer

Cipriano Teibão

Rank: New Member

Posts: 10

Join Date: December 14, 2012

Recent Posts

Hello,

I would like to show only part of an article to users if they are not logged in, and if they are logged in I want to show the totality of the article.

Can anyone please point me in the right direction on how to achieve this?

Please keep in mind that I am new to Liferay but I am slowly learning! emoticon

Please help!



Best regards,
Cipriano
Hitoshi Ozawa
RE: Show part of an article
February 4, 2013 3:39 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Just create 2 version of an article - one for the preview with permission set to allow guests to view it
another one with full content and with permission without view permission on guest.
Samuel Kong
RE: Show part of an article
February 4, 2013 7:38 PM
Answer

Samuel Kong

LIFERAY STAFF

Rank: Liferay Master

Posts: 959

Join Date: March 10, 2008

Recent Posts

Another option is make use of velocity to check permissions in your web content template.
Cipriano Teibão
RE: Show part of an article
February 5, 2013 1:32 AM
Answer

Cipriano Teibão

Rank: New Member

Posts: 10

Join Date: December 14, 2012

Recent Posts

Hi,

Thanks for your replies.

But I would like to use only one article, I don't want the user to have to write 2 different articles and then translate them. Isn't there any other way of doing it by not creating 2 different articles?

Many thanks,
Cipriano
Hitoshi Ozawa
RE: Show part of an article
February 5, 2013 4:19 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

You can modify the program so that'll show just part of an article or the entire article depending on user's permission.
Cipriano Teibão
RE: Show part of an article
February 5, 2013 6:32 AM
Answer

Cipriano Teibão

Rank: New Member

Posts: 10

Join Date: December 14, 2012

Recent Posts

Hitoshi Ozawa:
You can modify the program so that'll show just part of an article or the entire article depending on user's permission.



Hi Hitoshi,

Thanks for your reply, that's what my initial idea was, get the article programatically and display it full or part of if depending if the user is logged in or not, but i'm not sure how can i achieve that, can you please maybe provided me with some details? Or maybe if you know a similar example, point me to it? It would be awesome if you could.

Thanks,
Cipriano