Forum Discussion

gabiudrea's avatar
gabiudrea
Helper
13 years ago
Solved

Community skin name

Hello,

 

Is there any way to get the current skin name or other unique identifier (so the skin that's applied to the community) and use it inside a component?

 

I checked this link but couldn't find anything.

 

When using this ${skin} I got something like lithium.web2.data.skins.SkinContextObject@257074c

 

Are there any other objects exposed and where I can find a list or documentation

 

Cheers,

Gabi

  • This Freemarker call will give you the ID.  I couldn't find something that gives the name:

     

    <#assign skin_id = restadmin("/settings/name/skin.id").value />

     

2 Replies

  • This Freemarker call will give you the ID.  I couldn't find something that gives the name:

     

    <#assign skin_id = restadmin("/settings/name/skin.id").value />

     

  • gabiudrea's avatar
    gabiudrea
    Helper
    13 years ago

    But it's great, thanks!

     

    Used as you said

    <#assign skin_id = restadmin("/settings/name/skin.id").value />

     

    then using this ${skin_id} later in the component seems to return the skin name, so that's cool