Foros de discusión
list of defined segments
Pablo Zapico, modificado hace 9 años.
list of defined segments
Junior Member Mensajes: 48 Fecha de incorporación: 2/06/10 Mensajes recientes
Hello,
How I can see from my portlet development, the list of defined segments?
Thanks
How I can see from my portlet development, the list of defined segments?
Thanks
Julio Camarero, modificado hace 9 años.
RE: list of defined segments (Respuesta)
Liferay Legend Mensajes: 1668 Fecha de incorporación: 15/07/08 Mensajes recientes
Hi Pablo,
you can see how we obtain all the values in the method populateViewContext of ContentTargetingPortlet.java
You can call the UserSegmentService to obtain the list of User Segments in a site, for example:
The groupId should consider all the parent sites and the global scope also, you can do it this way:
cheers!
you can see how we obtain all the values in the method populateViewContext of ContentTargetingPortlet.java
You can call the UserSegmentService to obtain the list of User Segments in a site, for example:
UserSegmentLocalServiceUtil.getUserSegments(long[] groupIds)
The groupId should consider all the parent sites and the global scope also, you can do it this way:
ContentTargetingUtil.getAncestorsAndCurrentGroupIds(themeDisplay.getScopeGroupId()
cheers!
Pablo Zapico, modificado hace 9 años.
RE: list of defined segments [SOLVED]
Junior Member Mensajes: 48 Fecha de incorporación: 2/06/10 Mensajes recientes
Thank you very much. This is great. Congratulations.
P.D: You are the best
P.D: You are the best