Forum Discussion

bowenli's avatar
11 years ago

how to get avatar max image width setting from a different skin

Suppposed that:

There are 2 skins in the community:

in Skin A : 

Max. Avatar width: 60px;

 

In Skin B:

Max. Avatar width: 100px;

 

Steps:

1. change avatar image by uploading an image from compunter.

2. run API call "restapi/vc/users/id/XXX/profiles/avatar/size/message"

 

Result:

API shows that the avatar message max-width is set to be 60px,which is the setting in Skin A.

 

Question:

I want the max-width setting from Skin B , could I achieve this goal?

 

 

 

  • I don't think that's possible, the rest call is made in the context of the current skin.
    • bowenli's avatar
      bowenli
      Ace

      We have multiple skins in the community. our blog page is using Skin B, our test component is installed on that blog page. 

      <#assign imgUrl = restadmin(message.author.@href + "/profiles/avatar/size/profile").image.url />

       In the component, we have this freemarker code. but it returns the wrong image size(from Skin A; Community homepage is using Skin A). 

       

      Any ideas?

      • This is returning the size from the content of the main skin, make sure that you make the call in the skin B, inside the context of the blog.