URL schema and Blog Post Information

Highlighted
New Member
1 0 0

I am trying to access the information for a specific blog post using the URL schema object. So basically, if they select a blog post, I want to get the:

 

1. Name of the Blog Post selected (inserted into H2)

2. Blog Post Image (inserted into the background image css)

3. URL for the blog post (inserted into the <a href>)

 

Could anyone help me figure this out? I could not really find any articles for this specific instance.

 

Thank you in advance!

 

HTML

<div class="container-fluid middle-parallax-container">
  <div class="row">
    <div class="col-sm-12">
      <a href="/blogs/journal/jennie-kwon" title="Featured Journal Post" class="middle-parallax vertical-center bg-cover hidden-xs" style="background-image: url('{{ section.settings.image | url: 'original' }}')">
        <div class="vertical-center-inner">
          <div class="middle-parallax-content text-center">
            <h2>{{ section.settings.blog | upcase }}</h2>
            <div class="button button-line button-line-white">{{ section.settings.button | upcase }}</div>
          </div>
        </div>
      </a>
    </div>
  </div>
</div>

Schema

{% schema %}
{
  "name": "Featured Blog",
  "settings": [
    {
      "type": "header",
      "content": "Post Settings"
    },
    {
      "type": "url",
      "id": "blog",
      "label": "Select Post"
    },
    {
      "type": "header",
      "content": "Button Settings"
    },
    {
      "type": "text",
      "id": "button",
      "label": "Button Text",
      "default": "View Journal"
    }
  ],
    "presets" : [
    {
      "category" : "Blog",
      "name" : "Featured Blog"
    }
  ]
}
{% endschema %}
0 Likes