Riju Mahna
Riju Mahna

Reputation: 6926

How to add CSS, Images to a page in CQ5?

I am creating a new template and then a page from SCRATCH in CQ5. But I can't find the option to add my own CSS/images/JS to the page.

I mean a place to add/upload the actual files.

All the tutorials I've seen talk only about creating a template based on an existing template. Is there any tutorial on how to create the page from scratch ?

Upvotes: 1

Views: 8214

Answers (2)

Riju Mahna
Riju Mahna

Reputation: 6926

@David , thanks for your answer, but for now, I got a better way to add and then use external files using WebDAV with CQ5.

The basic integration of WebDAV with CQ5 application is mentioned in this page

Upvotes: 3

David Gorsline
David Gorsline

Reputation: 5018

Your CSS and JavaScript go into nodes under /etc/designs/[your project's name]/clientlibs. (Ordinarily, you would set the page property cq:designPath of your content's home page to be /etc/designs/[your project's name] to point to this.) It's common practice to set up a subfolder of clientlibs called default, where your general-purpose style sheets and JavaScript go; you can set up other clientlibs for special-case script and style sheets. The simplest way to incorporate your script and style sheets into your page template is the <cq:includeClientLib> JSP tag.

The Adobe docs on clientlibs will also be useful to you, and explains how to use the tag.

Upvotes: 5

Related Questions