How to apply font for only one component?
Hi All,
I have a template which has many components. In that only one component i have to apply custom font.
could you please help me out? how to fix the issue?
Thanks,
Michael
Hi All,
I have a template which has many components. In that only one component i have to apply custom font.
could you please help me out? how to fix the issue?
Thanks,
Michael
Hi
As mentioned by Praveen, components are modules, they can have their own JS and CSS.
So to implement CSS/JS only to the component,
Add CSS and JQuery files to a CQ:ClientLibraryFolder node
To add CSS files and the JQuery framework to your component, add acq:ClientLibraryFolder node to your component. After you create the node, set properties that allow the JSP script to find the CSS files and the JQuery library files.
To add the JQuery framework, add a new node named clientlibs to your component (as discussed later). Add these two properties to this node.
After you create the Clientlibs folder, add a CSS file, and the JQuery library file, and two map text files.
And add the "<cq:includeClientLib categories="jquerysamples" />" to jsp to reflect the client libs changes.
Reference Link:- https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html
I hope this will help you.
Thanks and regards
Kautuk Sahni
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.