With Community release 18.1, we are announcing a deprecation path for referencing assets within Community skins using the asset FreeMarker context object get method. Lithium is enforcing this change to improve Studio Publish performance and reliability and to ensure that SCSS compilation (translating SCSS to CSS) is done as efficiently as possible.
While we generally recommended against using FreeMarker to reference assets in skins, we have supported the .get(“destination_url”) method in CSS/SCSS files.
We will continue to support the FreeMarker technique in CSS/SCSS until 18.8.
Important: asset.get("destination_url")remains the recommended way to reference assets within FreeMarker code for templates such as custom components, endpoints, a skin’s header/head/footer/hitbox, and the page initialization script.
We have updated the Other Assets tab in Studio > Community Style > Asset Library to include the correct syntax to use with both FreeMarker and CSS files for a given asset uploaded to Studio.
Deprecation path for Freemarker asset technique in CSS/SCSS
We will end support for asset.get("destination_url") in skin CSS/SCSS with Community release 18.8.
Lithium will migrate any existing skins containing asset.get("destination_url") to the new technique as part of the 18.8 upgrade process.
The migration will change a reference to an asset like this:
background-image: url(${asset.get("/html/assets/disappear.gif")});
to this:
background-image: url(asset("/html/assets/disappear.gif"));
If your community maintains your skin in Studio, no action on your part is required after the 18.8 upgrade. If your community maintains your skin using the Community Plugin SDK, you'll need to pull the updates to the skin from Studio, review for changes, and merge any local changes.
After the 18.8 upgrade, browsers will ignore CSS declarations using asset.get("destination_url").
... View more