Forum Discussion

bma's avatar
bma
Mentor
12 years ago

Can I get the CSS of a specific custom skin by REST API or endpoint?

Hi,

 

I'd like to specify some site specific CSS in a custom skin (either top-level, desktop, or mobile) and read the CSS via custom endpoint or REST API.

 

Currently, I can determine a particular node's selected skin with 

 

/restapi/vc/[node]/settings/name/skin.id 

 

Then update the skin context object and enumerate its properties and images via freemarker:

 

${skin.set([id])}
<#list skin.properties?keys as prop>
  "${property}": "${skin.properties[prop]}"
</#list>
  1. Am I able to additionally specify the skin type: top/base-level, desktop, or mobile (e.g. to read a custom skin's mobile configuration when device-view is desktop)?
  2. Can I get the Additional/Extra CSS as specified in the Skin CSS tab and/or the full generated CSS or URL for the custom skin?
  3. If not, is there a better or recommended location for including site specific custom CSS that is exposed in either Admin or Studio?

Thanks,

Ben

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)
    Hi bma,

    what is the problem that you are trying to solve here? I am not currently aware of methods to do what you ask, however if you need to include very specific CSS in certain areas / pages - I would use a custom content component for that - but it really depends on what you are trying to achieve.

    Cheers,