Forum Discussion

Gursimrat's avatar
Gursimrat
Leader
11 years ago

Switch Skin from My Profile Page

We have 2 skins on our community out of which user can choose 1 for themselves from My Profile Page > Prefreneces where we have a checkbox called Show a light background for main PlayStation Skin, if we select that, we have skin 2 applied on for the user.

 

This switch skin feature was added by Lithium Support team last time for us. Now, we are again working on 2 new skins and want to have this feature enabled for the users, below is the endpoint I found on our community which lithium created, but where do I specifiy which skin needs to be applied on checking the check box? Do I need to create a new endpoint? 

 

<#if !user.anonymous>
  <#assign light_display = restadmin("/users/id/${user.id}/profiles/name/light_display").value />  
  <#if light_display == "true"> 
    ${restadmin("/users/id/${user.id}/profiles/name/light_display/set?value=false")}
  <#else>
    ${restadmin("/users/id/${user.id}/profiles/name/light_display/set?value=true")}
  </#if> 
</#if>

 

3 Replies

  • AdamN's avatar
    AdamN
    Khoros Oracle
    11 years ago

    Hi Gursimrat,

     

    There is likely some code elsewhere responsible for reading the user setting, and then setting the appropriate skin for display. Depending on how this was implemented, it may also be possible that this code is not accessible through Studio. Typically when there is logic to set a skin, it must be done in a special Page Initialization component that is not currently supported by Studio.

     

    If you're not finding the relevant code, I would suggest contacting Support since they originally assisted with the Customization. Depending on the complexity of the changes required, it may also be necessary to engage our Professional Services team.