# Filter pages to make a page list

**URL:** <https://forum.ghost.org/t/filter-pages-to-make-a-page-list/7289>\
**Category:** Themes\
**Created:** [May 14, 2019, 11:57am UTC](https://forum.ghost.org/t/filter-pages-to-make-a-page-list/7289 "2019-05-14T11:57:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Melon\_Marauda](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/melon_marauda/32/3182_2.png) [@Melon\_Marauda](https://forum.ghost.org/u/Melon_Marauda)\
**Post date:** [May 14, 2019, 11:57am UTC](https://forum.ghost.org/t/filter-pages-to-make-a-page-list/7289/1 "2019-05-14T11:57:34Z")

</div>

Hey  
So on the tag pages it dynamically creates a list of posts that have that tag. On the tag pages we have added a sidebar which adds a list of static posts that we want to stay there all the time. The only thing is we want each tag page to have its own list of pages. So I was wondering if there was a way to filter the list of pages so that way the only ones displayed are the ones that are related to the tag.  
Currently I have this.

```
<aside class="blog-sidebar">
 
{{#get "pages" as |pages-list|}}
{{#if pages-list}}
<section class="navbar" style="padding-bottom:90px; padding-top:10px">
		{{#foreach pages}}
			<a style="text-decoration: none" href="{{url}}"><section class="post-card post"><h2 style="margin-top:20px">{{title}}</h2></section></a>
		{{/foreach}}
</section>
{{else}}
<p>Coming Soon</p>
{{/if}}
{{/get}}

  </section>
</aside>

```

We tried this to filter it but it ended up just showing nothing rather than any pages at all.

```
<aside class="blog-sidebar">
 
{{#get "pages" filter="tags:{{slug}}" as |pages-list|}}
{{#if pages-list}}
<section class="navbar" style="padding-bottom:90px; padding-top:10px">
		{{#foreach pages}}
			<a style="text-decoration: none" href="{{url}}"><section class="post-card post"><h2 style="margin-top:20px">{{title}}</h2></section></a>
		{{/foreach}}
</section>
{{else}}
<p>Coming Soon</p>
{{/if}}
{{/get}}

  </section>
</aside>
```
