[SOLVED] Collection not working correctly

I’m using the Dawn theme and trying to modify it to include a separate set of “newsletter” posts that don’t show up on the main page.

I tried doing something similar to this but I’ve been banging my head against this for an hour now with no luck.

  /subscribe/: members/subscribe
  /signup/: members/signup
  /signin/: members/signin
  /account/: members/account
  /upgrade/: members/upgrade

    permalink: /newsletter/{slug}/
    data: tag.newsletter
    template: index
    filter: 'tag:newsletter'
    permalink: /{slug}/
    template: index
    filter: 'tag:-newsletter'

  tag: /tag/{slug}/
  author: /author/{slug}/

I have a test post tagged as newsletter, and the other posts are untagged (though I did try tagging one with #essay). But the main page still shows everything together, and also the slugs for the newsletter are still site.com/{slug} not site.com/newsletter/{slug}.

My understanding is I shouldn’t need to modify any .hbs files to get this work, but I’m at a loss as to what to try next.

This is on v4. Thanks in advance for any help!

I gave your example a try and it works. Probably, you didn’t yet uploaded the routes.yaml file?

1 Like

Thank you! I didn’t realize routes.yaml wasn’t part of the theme - I kept updating my theme and uploading and going crazy. Everything is working now, thank you for your help!!!

1 Like