2017-09-26 5 views
0

Shopify 테마를 만들고 더 매끄러운 슬라이더 플러그인을 추가하는 중입니다. http://kenwheeler.github.io/slick/.섹션이있는 매끄러운 슬라이더를 제작하는 데 문제가 있습니까?

내부 및 슬라이더 용 코드 설정을 위해 json 스키마를 만들었지 만 작동하지 않습니다. 나는 오류 메시지가 받고 있어요 :

15시 48분 35초 [개발] 자산 호스트 unique-legacy.myshopify.com에서/매끄러운 silder.liquid 섹션으로 업데이트를 수행을
상태 : (422) 처리 할 수 ​​없음 엔티티 오류 : 잘못된 JSON 태그 '스키마'에서 15시 48분 58초 [개발] 자산 설정/settings_data.json

내 스승이 아닌 JSON 스키마 잘못 아무것도하지만, 뭔가 자신의가는 것을 저에게 말했다 무시 패턴을 기반으로 필터링 슬라이딩 슬라이더가 생성되었지만 계속 진행되는 동안 머리를 감쌀 수는 없습니다.

설명 코드 : 만들려고하는 것은 새로운 섹션 옵션 안에있는 방식으로 매끄러운 모양의 사용자 지정 슬라이더입니다.

테마를 사용하는 사용자는 슬라이더를 페이지에 놓고 아래 또는 위로 이동할 수 있습니다.

은 누군가가 당신은 당신의 JSON 스키마에 오류가에

{% if section.blocks.size > 0 %} 
<!-- Slick Slider Wrapper --> 
<div class="carousel-wrapper" style="background-color: red;"> 
    <div class="carousel-info"> 
     <!-- Title Slider Wrapper --> 
     <h3>{{ section.settings.carousel_title }}</h3> 
     <!-- Description Wrapper --> 
     <p>{{ section.settings.carousel_product_description }}</p> 
     <!-- Button Wrapper --> 
     <button>{{ section.settings.carousel_button_title }}</button> 
    </div> 

    <!-- Slick Slider --> 
    <div id="carousel-{{ section.id }}" class="carousel" data-slick="autoplay"> 
    {% for block in section.blocks %} 
     <div class="carousel-slide--{{ block.id }}" {{ block.shopify_attributes }} style="width:240px"> 
      {% if block.settings.carousel_image != blank %} 
        <img class="carousel_image--{{ block.id }}" src="{{ block.settings.carousel_image | img_url: '240x' }}" style="max-width:240px;display:inline-block;padding:40px"> 
      {% endif %} 
     </div> 
    {% endfor %} 
    </div> 
    <!-- ended of Slick Slider --> 
    </div> 

    </div> 
    {% endif %} 

    {% if section.blocks.size == 0 %} 
    <div class="placeholder-noblocks"> 
     {{ 'homepage.onboarding.no_content' | t }} 
    </div> 
    {% endif %} 

    <!-- Slick Slider Wrapper --> 

{% schema %} 
{ 
     "name": "Carousel Images", 
     "max_blocks": 8, 
     "settings": [ 
     { 
      "type":"header", 
      "content":"Carousel option" 
     }, 
     { 
      "type":"text", 
      "id":"carousel_title", 
      "label":"Carousel title", 
      "default":"Carousel main title" 
     }, 
     { 
     "type": "text", 
     "id": "carousel_title", 
     "label":"Carousel title", 
     "default":"Carousel main title" 
     }, 
     { 
     "type": "text", 
     "id": "carousel_product_description", 
     "label": "Carousel Description", 
     "default: Carousel Main Description" 
     }, 
     { 
     "type": "url", 
     "id": "carousel_link", 
     "label": "Carousel title link" 
     }, 
     { 
      "type":"header", 
      "content":"In depth carousel option" 
     }, 
     { 
     "type": "checkbox", 
     "id": "carousel_autoplay", 
     "label": "Auto-rotate slides", 
     "default": false 
     }, 
     { 
      "type":"color", 
      "id":"carousel_bg", 
      "label":"Carousel background", 
      "default":"#fff" 
     } 
    ], 
    "blocks": [ 
     { 
     "type": "image", 
     "name": "Image slide", 
     "settings": [ 
      { 
      "type": "image_picker", 
      "id": "carousel_image", 
      "label": "Image" 
      }, 
      { 
      "type": "url", 
      "id": "slide_link", 
      "label": "Slide link" 
      } 
     ] 
     } 
    ], 
    "presets": [{ 
     "name": "Carousel", 
     "category": "Image", 
     "settings": { 
     "carousel_autoplay": false 
     }, 
     "blocks": [ 
     { 
      "type": "image" 
     }, 
     { 
      "type": "image" 
     }, 
     { 
      "type": "image" 
     }, 
     { 
      "type": "image" 
     }, 
     { 
      "type": "image" 
     }, 
     { 
      "type": "image" 
     } 
     ] 
    }] 
    } 
{% endschema %} 

답변

0

하시기 바랍니다 설명 할 수 있습니다.

{ 
    "type": "text", 
    "id": "carousel_product_description", 
    "label": "Carousel Description", 
    "default: Carousel Main Description" 
    }, 

default에서 폐문 및 "Carousel Main Description 없음 개구 " 없다.

여기서 JSON을 확인하십시오 : https://jsonlint.com/도 표시됩니다.

관련 문제