May 10, 2020
Estimated Post Reading Time ~

Structure the Templates

  1. All your template resources should be in /apps/<project>/components/structure and templates will go at /apps/<project>/templates.
  2. There should be a base resource /apps/<project>/components/structure/base which should have the templating script structure. This you can get from the archetype.
  3. Note: the base should contain only structure, basic includes. It should not have any specific functional content.
  4. There should be a homepage templating resource which is inherited from the base. It should overlay all the files which need explicit behavior like header,headlibs, footer, footlibs
  5. Other template resources can either be inherited from the base or homepage based on the requirement.
  6. None of the templates will directly point to the bass resource.
  7. Templates should have the cq:designPath=/etc/designs/<project>
  8. Templates should have allowedPaths to restrict their access.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.