# Assigning a template to a collection in routes

**URL:** <https://forum.ghost.org/t/assigning-a-template-to-a-collection-in-routes/8033>\
**Category:** Themes\
**Created:** [June 30, 2019, 5:40pm UTC](https://forum.ghost.org/t/assigning-a-template-to-a-collection-in-routes/8033 "2019-06-30T17:40:00Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![diegoeis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/diegoeis/32/18763_2.png) [@diegoeis](https://forum.ghost.org/u/diegoeis)\
**Post date:** [March 27, 2023, 4:35pm UTC](https://forum.ghost.org/t/assigning-a-template-to-a-collection-in-routes/8033/7 "2023-03-27T16:35:13Z")

</div>

I’m having same issue. I was expecting the posts inside the collection `manual` use `manual.hbs`. But, just the the `/manual/` are using this template.

@DavidDarnes can you see some error on routes.yaml?  
The posts with /manual/_slug_, are getting the posts.hbs template instead.

I already restarted ghost too. Here my routes and template `manual.hbs`

```yaml
routes:
  /estrategia/:
    controller: channel
    filter: tag:[manual,estrategia]

collections:
  /:
    permalink: /{slug}/
    template: index
    filter: tag:-manual
  /manual/:
    permalink: /manual/{slug}/
    template: manual
    filter: primary_tag:manual
    order: featured desc, published_at desc

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

```

Manual.hbs

```html

{{!< default}}
{{!--manual.hbs--}}

{{#post}}

<main class="eis-manual-main">

  <aside class="eis-manual-sidebar">

    <h2><a href="#">Eis o Manual</a></h2>

    <nav>
      {{#get "posts" filter="tag:manual" as |posts|}}
      {{#foreach posts}}
      <ul>
        <li><a href="{{url}}">{{title}}</a></li>    
      </ul>
      {{/foreach}}
      {{/get}}
    </nav>

  </aside>

  <section class="eis-manual-content">

    <h1 class="eis-article-title">{{title}}</h1>
    <h2 class="eis-article-excerpt">{{excerpt}}</h2>
    <div class="eis-article-content">
    {{content}}
    </div>
  </section>

</main>

{{/post}}

```

I was doing some research, it seems this post have same issue.

> [@Templates for posts in a collection](https://forum.ghost.org/t/templates-for-posts-in-a-collection/23466):
>
> I created a collection in my routes.yaml file so I can have posts show up with the primary tag in the URL, like so: routes.yml collections: /favorites/: permalink: /favorites/{slug}/ template: favorites filter: primary\_tag:favorites Results /favorites uses the favorites.hbs template /favorites/{slug} uses the post.hbs template I can’t figure out how to get the individual posts to use a template other than post.hbs. Seems like tag-favorites.hbs should do the trick, but every…

Posts at `/manual/*slug-post*` uses the template defined in `routes.yml` automatically, right?

---

_[View the full topic](https://forum.ghost.org/t/assigning-a-template-to-a-collection-in-routes/8033)._
