New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

How (and where) best to create a collection and a page with an addon.

Dan Matthews May 9, 2019 by Dan Matthews

Hey all, first post here!

I'm currently working on compartmentalising product creation for Snipcart products through the Statamic UI for a client.

I've created a "Snipcart Product" collection, but i'm essentially doing it for the first time when the user visits the settings page for the store.

  1. What's the consensus on the best place to do this so that once they've installed the addon, the "Snipcart Products" collection becomes available. The same goes for creating a "store" listing page that i can set a template for.
  2. How can i provide (and set) a template for this collection's entries? Is there a way to write to the folder.yaml for the collection you create?
  3. Can you add routes for these collections through your addons - as i noticed it prefixes them by default?
  4. Can i add a route and template for a frontend page such as /shop.

Thanks for any guidance you can give me on any of these!

Answered by Erin Dalzell!
>>>>>>> Answered <<<<<<<
2 Replies