This forum has moved, please join us on github discussions. We will keep these old posts available for reference. Thank you!

What is the URL structure of pieces content?

Hello,

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?

Thanks,
Paul

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