treefrog
treefrog

Reputation: 1057

Can I make a simple page in CQ ?

What is the minimum that I have to do to make a content page and render it in CQ ? Do I have to have a template ? Does it have to be a CQ:Page type node with a supertype ?

Upvotes: 2

Views: 951

Answers (2)

kautuksahni
kautuksahni

Reputation: 439

As mentioned my "Brian",

Short Answer See:- http://localhost:4502//apps/geometrixx-gov/templates/homepage

create a node of type cq:Page and save, add cq:PageContent node under page node, add required properties to show the component & if you want to add some default node under this cq:PageContent node add all of them manually.

Long Answer Can we create a page without template?

in this post I will explain it's answer in detail. before knowing the answer of this question just rethink the definition of a Template.

"A template is used to create a Page and defines which components can be used within the selected scope. A template is a hierarchy of nodes that has the same structure as the page to be created, but without any actual content"

when you create a template using crxde lite then it creates two nodes by default having primaryTypes cq:Template as parent cq:PageContent as child

When we create a page using template via siteadmin then siteadmin uses content page component & it copies all the child nodes under the template to a newly created page node.

and once the page has been created it doesn't require cq:Template as all the child node of the template copied under cq:Page node & these nodes contains all the required properties to display a component group for that page.

It means if you want to create a page without template you can do that but it's not possible using siteadmin console as it's content page component uses templates to create pages.

you have to do all this stuff manually from crxde i.e.

create a node of type cq:Page and save, add cq:PageContent node under page node, add required properties to show the component & if you want to add some default node under this cq:PageContent node add all of them manually.

It's not a good practice to create a page manually, always use templates as it provides different set of properties which are very helpful while creating pages or websites. Some of important properties are - allowedTemplates allowedPaths (deprecated Now) allowedParents allowedChildren

these properties can be used for filtering the page structure using siteadmin console. but if you are creating a page manually then you have to take care about all of these restriction by your own.

Source Link:- http://versatileankur.blogspot.in/2014/07/page-without-template-in-cq5.html

Another Ways:-

Use of Site Importer tool Link:- https://docs.adobe.com/docs/en/aem/6-2/develop/dev-tools/site-importer.html

It helps in importing static website into AEM.

Creating a Website Link:- http://www.aemcq5tutorials.com/tutorials/aem-create-a-website-in-cq5/

I hope this would help you.

Thanks and Regards Kautuk Sahni

Upvotes: 2

Brian Gradin
Brian Gradin

Reputation: 2275

The absolute minimum is a node with primaryType of cq:Page (or a subtype) and a child node called jcr:content with a primaryType of cq:PageContent (or a subtype).

Of course, this will render a blank page. To render something on this page, you need to add nodes to the jcr:content node.

Upvotes: 2

Related Questions