Handlebars - Getting a list of pages

Hi !

I’m quite new to Ghost, but I’m very excited about it ! :smiley:

I want to make a list of my pages only (not my posts). I actually tried this :

{{#get "posts" include="page" filter="page:true" limit="all"}}
    foo
    {{posts}}
    {{#foreach posts}}
        bar
    {{/foreach}}
{{/get}}

But it only displays “foo”.
Am I doing something wrong ?

Regards,

Hello! @Vahowim

Try:

{{#get "pages" limit="all"}}
{{#foreach pages}}
...
{{/foreach}}
{{/get}} 

It works ! Thank you very much ! :smiley:

No problem :slight_smile: