Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Cipriano Teibão
Show part of an article
4 de febrero de 2013 11:01
Respuesta

Cipriano Teibão

Ranking: New Member

Mensajes: 10

Fecha de incorporación: 14 de diciembre de 2012

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
Hitoshi Ozawa
RE: Show part of an article
4 de febrero de 2013 15:39
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7949

Fecha de incorporación: 23 de marzo de 2010

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.
Samuel Kong
RE: Show part of an article
4 de febrero de 2013 19:38
Respuesta

Samuel Kong

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1383

Fecha de incorporación: 10 de marzo de 2008

Mensajes recientes

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

Cipriano Teibão

Ranking: New Member

Mensajes: 10

Fecha de incorporación: 14 de diciembre de 2012

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
Hitoshi Ozawa
RE: Show part of an article
5 de febrero de 2013 4:19
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7949

Fecha de incorporación: 23 de marzo de 2010

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
RE: Show part of an article
5 de febrero de 2013 6:32
Respuesta

Cipriano Teibão

Ranking: New Member

Mensajes: 10

Fecha de incorporación: 14 de diciembre de 2012

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