Expand my Community achievements bar.

SOLVED

Blank page template for structural nodes

Avatar

Level 2

Hello,

I have an application in which I need pages acting like structural nodes to arrange the actual pages within a section. To avoid the performance issues with the 1000 child nodes.

The structure is something like this:

/Home

    /section

        /{YEAR} (blank page - just structure)

            /{MONTH} (blank page - just structure)

                /{ACTUAL_PAGE1}

 

Should I create a blank page template for this blank nodes?

Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Level 6

Hi Juan,

technically, you could use any node type, even an nt:unstructured, but using a base template has the advantage that you have all the functionality of a cq:Page. I would recommend you to create a basic template that you use for structure initially. If it should contain any paragraph system or not is up to you, but it might be the one that holds stuff like header, footer, logos and other meaningful design items that is a part of the site.

One good thing with having an empty parsys on the basic page is that you also could use it for anything that "doesn't really fit in any other template" or just simply as the render for a template. You can define your components in the template and have the basic page as the resourceType so that the same /apps/mysite/content/page/basic renders a lot of templates.

What you also then can do is place utility components on the page that can pick up Sling selectors, extensions and request parameters. Using your structure, you could quite easy get the node to list everything that is a child of its node. Say you want to get all pages from 2011, paged from index 0 to 24, as a list. Then the call could be something like http://.../home/section/2011.list.0.25.html. Filter all that is of type Feature could be http://.../home/section/2011.list.0.25.html/Feature.

/Ove

View solution in original post

1 Reply

Avatar

Correct answer by
Level 6

Hi Juan,

technically, you could use any node type, even an nt:unstructured, but using a base template has the advantage that you have all the functionality of a cq:Page. I would recommend you to create a basic template that you use for structure initially. If it should contain any paragraph system or not is up to you, but it might be the one that holds stuff like header, footer, logos and other meaningful design items that is a part of the site.

One good thing with having an empty parsys on the basic page is that you also could use it for anything that "doesn't really fit in any other template" or just simply as the render for a template. You can define your components in the template and have the basic page as the resourceType so that the same /apps/mysite/content/page/basic renders a lot of templates.

What you also then can do is place utility components on the page that can pick up Sling selectors, extensions and request parameters. Using your structure, you could quite easy get the node to list everything that is a child of its node. Say you want to get all pages from 2011, paged from index 0 to 24, as a list. Then the call could be something like http://.../home/section/2011.list.0.25.html. Filter all that is of type Feature could be http://.../home/section/2011.list.0.25.html/Feature.

/Ove