How to use client libs in Sightly
First you should declare data-sly-use.clientlibInclude in your .html file
<div data-sly-use.clientlibInclude="${'/libs/granite/sightly/templates/clientlib.html'}"></div>
how to include only CSS of clientLibs
<output data-sly-call="${clientlibInclude.css @ categories='clientlib1, clientlib2'}" data-sly-unwrap/>
how to include only JS of clientLibs
<output data-sly-call="${clientlibInclude.js @ categories='clientlib1, clientlib2'}" data-sly-unwrap />
how to include both CSS and JS of clientLibs
<output data-sly-call="${clientlibInclude.all @ categories='clientlib1, clientlib2'}" data-sly-unwrap />
No comments:
Post a Comment
If you have any doubts or questions, please let us know.