Explorar el Código

修改swiper:可点击跳转至详情页,轮播图图片数量不受限制

littlegreen hace 8 meses
padre
commit
ea5ea8c1fb
Se han modificado 1 ficheros con 6 adiciones y 4 borrados
  1. 6 4
      cms-editor/templates/default_v5/swiper.html

+ 6 - 4
cms-editor/templates/default_v5/swiper.html

@@ -34,9 +34,10 @@
         <div class="swiper bsb-hero-pro-5-swiper" style=" --swiper-theme-color: #a9afb487;padding: 0;">
           <div class="swiper-wrapper">
             <!-- Slides -->
-            {dreamer-cms:list typeid="9jdjs0s8" pagenum="0" pagesize="3" flag="p"}
+            {dreamer-cms:list typeid="9jdjs0s8" pagenum="0" flag="p" sortBy="weight" sortWay="desc" formkey="h4j2gb6u" addfields="href"}
             <div class="swiper-slide">
-              <a href="#">
+              <!-- {dreamer-cms:global name='website' /}article/[field:href /] -->
+              <a href="[field:arcurl /]">
                 <img data-src="[field:litpic /]" alt="[field:title /]" style="width: 100%;height: auto;">
               </a>
             </div>
@@ -55,7 +56,7 @@
   <script>
     var mySwiper = new Swiper('.swiper', {
       // direction: 'vertical', // 垂直切换选项
-      autoplay: true,
+      // autoplay: true,
       loop: true, // 循环模式选项
       // 如果需要分页器
       pagination: {
@@ -71,7 +72,8 @@
       scrollbar: {
         el: '.swiper-scrollbar',
       },
-    })  
+    }) 
+
   </script>
 </body>