Apostrophe CMS Main Site Forum Home

What is the URL structure of pieces content?



I am adding a custom piece type as follows:

module.exports = {
  extend: "apostrophe-pieces",
  name: "product",
  label: "Product",
  pluralLabel: "Products",

added to app.js as follows:

products: {}

directory structure:

- products/
    index.js (contains module.exports from above)

Add a product successfully, try to visit a url that seems like it ought to exist (/products/, /product/, /), and none of them work.

Am I overlooking some critical piece that enables the custom piece to be rendered from a URL?



Hi Paul,

This kind of thing should go to stackoverflow, tagged apostrophe-cms, so others can easily find the answers. Happy to answer there. The forum is for announcements and general discussion. Thanks!


Sure, no problem. Done: https://stackoverflow.com/questions/51048234/what-is-the-url-structure-of-pieces-content