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?

 

 

 

5 Replies

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

    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.
  • bowenli's avatar
    bowenli
    Ace
    11 years ago
    VarunGrazitti

    Yeah , the component was placed in the BlogPage ,which was in Skin B. But it still got the image width setting from Skin A.
  • This is strange. However, I think this is due to the fact that your Skin A is the parent skin to B, is that correct?