Pipe data into template! [What am i doing wrong?]


#1
  • What’s your URL? Local at the moment.
  • What version of Ghost are you using? Latest official docker image.
  • What configuration? ?
  • What browser? Not a browser issue.
  • What errors or information do you see in the console? Wrong formatting of the data field.
  • What steps could someone else take to reproduce the issue you’re having? Use the same yaml file.

This is the route in my yaml file,
It worked fine when i just piped the page: part through.
Then i added the authors: and everything went to shitz…

I have also tried with all the other tags indented beneath authors: but that as well threw me an error.

routes:
  /about/:
    data:
      page: page.about
      authors: users
    template:
      - about

What am i doing wrong? The console is piping this error out!

[2019-01-11 19:26:00] ERROR
NAME: ValidationError
MESSAGE: The following definition "users" is invalid: Incorrect Format. Please use e.g. tag.recipes
level:normal
empty
empty
ERROR DETAILS:
    empty
ValidationError: The following definition "users" is invalid: Incorrect Format. Please use e.g. tag.recipes

And then the stacktrace which doesn’t tell us too much :confused:

Does anyone have a quick tip, i have read the documentation about 200 times and spend 5 hours, thought about posting here 3 hours ago but decided to try a little bit more and managed to get the page: variable to work but i want the authors: users to pipe through as well!

Thanks in advance!


#2

Guess what, few minutes later and with one modification the ghost container booted up and gave me the data on the page xD thats so typical, hope perhaps this gets to stand though it’s solved for me, someone else might get into a similar issue later on.

Thanks if you were already searching/writing a solution for me!

routes:
  /about/:
    data:
      page: page.about
      authors:
        resource: users
        type: browse
    template:
      - about

closed #3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.