The categories property, being multi-valued, allows a library folder to be part of more than one category (see below for how this may be useful). categories: Identifies the categories into which the set of JS and/or CSS files within this cq:ClientLibraryFolder fall.See the section Locating a Client Library Folder and Using the Proxy Client Libraries Servlet below. allowProxy: Since all clientlibs must be stored under apps, this property allows access to client libraries via proxy servlet.Important properties of the cq:ClientLibraryFolder are configured as follows: Use the categories property of the node to identify the library categories to which it belongs.Įach cq:ClientLibraryFolder is populated with a set of JS and/or CSS files, along with a few supporting files (see below).cq:ClientLibraryFolder nodes can be placed anywhere within the /apps subtree of the repository. Its definition in CND notation is > sling:Folder Client-Side Library Folder StructureĪ client-side library folder is a repository node of type cq:ClientLibraryFolder. The archetype can then compile the resources into single CSS and JS files, embedding them automatically into a cq:clientLibraryFolder in the repository. The flexibility of the archetype allows you to use your modern web tools of choice to create and manage these resources. Front-End Development for AEM as a Cloud ServiceĪll JavaScript, CSS, and other front-end assets should be maintained in the ui.frontend module of the AEM Project Archetype. This maximizes the efficiency of delivery and allows such resources to be maintained centrally in the repository via proxy, keeping access secure. A clientlib is AEM’s mechanism to reference (by category if required) and serving such resources.ĪEM collects the site’s CSS and Javascript into a single file, in a central location, to ensure that only one copy of any resource is included in the HTML output. Sites require JavaScript and CSS as well as static resources such as icons and web fonts to be processed client-side. Front-end developers who are creating CSS and Javascript for AEM projects should also familiarize themselves with the AEM Project Archetype and its automated front-end build process.
0 Comments
Leave a Reply. |