Foros de discusión

Show part of an article

Cipriano Teibão, modificado hace 11 años.

Show part of an article

New Member Mensajes: 10 Fecha de incorporación: 14/12/12 Mensajes recientes
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
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: Show part of an article

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
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.
thumbnail
Samuel Kong, modificado hace 11 años.

RE: Show part of an article

Liferay Legend Mensajes: 1902 Fecha de incorporación: 10/03/08 Mensajes recientes
Another option is make use of velocity to check permissions in your web content template.
Cipriano Teibão, modificado hace 11 años.

RE: Show part of an article

New Member Mensajes: 10 Fecha de incorporación: 14/12/12 Mensajes recientes
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
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: Show part of an article

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
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, modificado hace 11 años.

RE: Show part of an article

New Member Mensajes: 10 Fecha de incorporación: 14/12/12 Mensajes recientes
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