View Page

Remember to check out the documentation for restdb.io Pages and for restdb.io Querying. You can also view the master template source code.

{{#context}}
{
  "blogposts": {
      "collection": "blogposts",
      "query": {"published": true,"slug":"{{pathparams.id}}"}
  }
}
{{/context}}
{{#inherit "layout"}}
    {{#block "title"}}
        <h1>{{blogposts.0.title}}</h1>
    {{/block}}
    {{#block "content"}}
        {{#with blogposts.[0]}}
           <div class="blog-post-single">
                <p class="author">by {{author.0.name}}<span> - {{moment date add="hours" amount="4" utc=true format="MMMM DD YYYY"}}</span>
                <div class="teaser">{{{teaser}}}</div>
                <div class="content">{{{content}}}</div>
                <p class="actions">
                    <a class="" href="{{../root}}/">Back</a>
                </p>
            </div>
        {{/with}}
    {{/block}}

{{/inherit}}