Tags helper isn't available


#1

Hi,

I’ve noticed that when creating a static page and routing to it using the yaml config file the {{tags}} helper isn’t available.

routes:
/: home
/develop/staticpage/:
data:
post: page.staticpage
template: staticpage

Has anybody else come across this?


#2

Which version of Ghost are you on please?


#3

Hi Hannah,

Ghost-CLI version: 1.9.9
Ghost version: 2.17.2

If it helps here’s a test template file that I created when looking into the issue. On further investigation it looks like that author isn’t being pulled through too.

{{!< default}}
{{> "header"}}
{{#post}}
   <p>author = {{authors}}</p>
   <p>tags = {{tags}}</p>
{{/post}}

Thanks

James


#5

I assume you are running into this issue.

Dynamic routing is in still in beta and we already have received some bug reports for static pages using the data key.

Possible workarounds:

  • use post instead of page for now?
  • fetch the target page with tags/authors using the {{#get…}} helper

#6

Thanks the {{#get…}} helper seems to be a good workaround for what I require