Search code examples
mustacheamp-htmlamp-mustache

Using Amp-carousel with Amp-mustache template


Trying to call images using Mustache from a JSON COR file into the amp-carousel. THought that this should work easy enough but having a few problems.

<amp-list width=auto
          height=auto
          layout=fixed-height
          src="carousel.json">



                <template type="amp-mustache" id="amp-template-id">

                    <li>

                      <amp-carousel width="400"
                          height="244"
                          layout="fixed"
                          type="slides"
                          autoplay
                          delay="4000">  

                    <amp-img width="400"
                             height="244"
                             layout="fixed"
                             src="{{src}}"></amp-img>                     


                      </amp-carousel>
                </li>

                </template>


                <div overflow
                     role=button
                     aria-label="Show more"
                     class="list-overflow">
                    Show more
                </div>
            </amp-list>

Solution

  • This is not possible as amp-list does not work in combination with amp-carousel:

    https://github.com/ampproject/amphtml/issues/4405