What is wrong with this collection yaml file?

I want to setup 2 x Collections (3 technically if you include base collection)

This is the following yaml file I have imported, but no matter what I do I simply can’t get the /certification/ collection working. The school collection is working no problem, and it has since first attempt. Adding the new /certification/ collection doesn’t play nice and I have not idea why?

  • I have imported the following yaml file
  • I have created a certification.hbs template file in the root of my theme. Exact same location as schools.hbs and page.hbs.
  • I have created a ‘certification’ page for /certification
  • I have created a ‘certification’ tag
  • I have assigned a post to the ‘certification’ tag
  • I have restarted server

What am I missing here? I just can’t see it.

    routes:

    collections:
      /schools/:
        permalink: /schools/{slug}/
        template: schools
        filter: primary_tag:schools
      /certification/:
        permalink: /certification/{slug}/
        template: certification
        filter: primary_tag:certification
      /:
        permalink: /{slug}/
        template: index
        filter: tag:-schools  

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

One idea: Check if the new files have the same permissions has the other ones. Check if the new files are owned by the same user as the old files (the ghost default hbs files).

Was this issue ever resolved? :slight_smile:
I’m having the same problem using Edge theme.
I can’t seem to get collections working at all except on one page only, here on the “works” page:


routes:
  /:
    data: page.home
    template: home
  

collections:
  /works/:
    permalink: /works/{slug}/
    template: index
    filter: tag:works
/featured/:
    permalink: /featured/{slug}/
    template: featured
    filter: tag:featured
  
taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

My featured.hbs file currently has this:


{{!< default}}

<div class="content-area">
    <main class="site-main container">
		  {{#page}}
            <div>
        <div class="post-feed">
			{{content}}
            <div class="grid-item grid-sizer"></div>
            {{#foreach posts}}
                {{> "loop"}}
            {{/foreach}}
			  </div>
        {{/page}}
        </div>
    </main>
</div>

I’ve tried using get commands but that also didn’t work so far.
Posts tagged with “works” shows up on the works page but posts tagged “featured” don’t show up on the featured page…or any posts with any tag
I’ve tried many different things including using the same index template…is there something in Edge them which might be stopping this from working?

Is that the exact formatting you’re using? If so then the indentation is incorrect and the /featured/: line needs two spaces at the beginning. In YAML files the indentation is important as it’s what denotes structure.

Thanks for the reply Kevin :slight_smile:
That’s helped. I corrected the indentation but I still got a blank page with no posts when my features.hbs has the code posted above.

But it’s now working when I use the same code from my index.hbs:

{{!< default}}

<div class="content-area">
    <main class="site-main container">
        <div class="post-feed">
            <div class="grid-item grid-sizer"></div>
            {{#foreach posts}}
                {{> "loop"}}
            {{/foreach}}
        </div>
        {{pagination}}
    </main>
</div>

so I’m getting somewhere at least. I’m not sure what I’ve done wrong with the previous code but at least I can experiment with this now thanks!