Folder Mapping

It’s not uncommon for websites to serve multiple URLs from a single document, displaying dynamic content for large portions of the page without authors having to create each page individually.

Some scenarios where this is useful:

AEM handles these cases via a folder mapping in the fstab.yaml file:


  # Generate everything on and below /products with the "generic-product"
  /products: /generic-product

  # Generate everything below /categories/ with the "default-category"
  # Note the trailing slash here, which differentiates this from the above example 
  # and applies the mapping only inside the categories folder
  /categories/: /categories/default-category

  # Use the given html from the code-bus for everything on and below /app
  /app: /spa/index.html

Additional Considerations

There are some additional rules applied to bulk metadata for folder mapped pages, see Folder-mapped metadata in the bulk metadata documentation for details.