留言板
Portrait Url without Theme Display
Asad Saeed Awan,修改在7 年前。
Portrait Url without Theme Display
Regular Member 帖子: 126 加入日期: 15-1-16 最近的帖子
Hello,
How do I get portrait URL without theme display?
How do I get portrait URL without theme display?
Andrew Jardine,修改在7 年前。
RE: Portrait Url without Theme Display
Liferay Legend 帖子: 2416 加入日期: 10-12-22 最近的帖子
Hi Asad,
I am curious -- where are you trying to access the portrait URL from that you don't have a theme display?
Apart from my question, the method that uses the theme display only seems to require the image path. Perhaps you can calculate it separately. My search of the source revealed it as calculated like so --
Once you have it, and the user details of course, then you can just use the logic from that method (that uses the ThemeDisplay parameter). The UserConstants class is in the portal-service.jar so it is available across the server.
Let me know if that helps -- and where you are trying to access the portrait URL from.
I am curious -- where are you trying to access the portrait URL from that you don't have a theme display?
Apart from my question, the method that uses the theme display only seems to require the image path. Perhaps you can calculate it separately. My search of the source revealed it as calculated like so --
setPathThemeImages(
cdnBaseURL + themeStaticResourcePath + theme.getImagesPath());
Once you have it, and the user details of course, then you can just use the logic from that method (that uses the ThemeDisplay parameter). The UserConstants class is in the portal-service.jar so it is available across the server.
return UserConstants.getPortraitURL(
themeDisplay.getPathImage(), isMale(), getPortraitId(),
getUserUuid());
Let me know if that helps -- and where you are trying to access the portrait URL from.