Supply Theme - Created Text on Slider, But wont work properly.

Highlighted
Tourist
4 0 1

Hi all, 

Site is:
http://sheer-shea.myshopify.com/
Pass: teststore
I have created text overlay with the slider that comes with the Supply theme. I would love this to be a solution for everyone if anyone else has the interest of doing so. 
However, I am missing perhaps what could be the final link to all of this. 

What I have done so far:
Added new fields in the settings_schema.json file to make it editable in the Template manager:

 

      {
        "type": "text",
        "id": "slide_1_heading",
        "label": "Heading"
      },
      {
        "type": "text",
        "id": "slide_1_sub",
        "label": "Subtitle"
      },

I then copied some of the liquid markup that is already in the slider.liquid file like so:

      {% for i in (1..6) %}
        {% capture slide %}slide_{{ i }}{% endcapture %}
        {% capture slide_link %}slide_{{ i }}_link{% endcapture %}
        {% capture slide_img %}slide_{{ i }}.jpg{% endcapture %}
        {% capture slide_alt %}slide_{{ i }}_alt{% endcapture %} <--- Copied this for the below
      	{% capture slide_header %}slide_{{ i }}_heading{% endcapture %}
     	{% capture slide_subtitle %}slide_{{ i }}_sub{% endcapture %}
        {% if settings[slide] %}

Then added in the same file:

 

          <li>
            <a href="{{ settings[slide_link] }}" class="slide-link">
              {{ slide_img | asset_url | img_tag: settings[slide_alt] }}
            </a>
            <h1> <-- added from here and below
              {{ slide_header }}
            </h1>
            <p>
              {{ slide_subtitle }} 
            </p>
          </li>

Followed by wrapping all of this in a div tag with a class to add styling.

The result I get on the site you will notice is " SLIDE_1_HEADING" & "slide_1_sub".

 

So by the looks of it, {{ slide_header }} seems to pick up "slide_1_heading" but "slide_1_heading" doesnt seem to be picking up what is writen in the Template manager for the user to edit. 

 

Does this make sense? ANd is there any solution or nudge in the right direction? 

1 Like
Highlighted
Shopify Expert
9930 105 1766

Very close:

<h1>
  {{ settings[slide_header] }}
</h1>
<p>
  {{ settings[slide_subtitle] }} 
</p>

 

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
1 Like
Highlighted
Excursionist
11 0 0

{
"type": "text",
"id": "slide_1_heading",
"label": "Heading"
},
{
"type": "text",
"id": "slide_1_sub",
"label": "Subtitle"
},


is giving a lot of errors on settings json .. could you please review 

0 Likes