DEDECMS给图集图片{dede:productimagelist}加自增函数

前端之家收集整理的这篇文章主要介绍了DEDECMS给图集图片{dede:productimagelist}加自增函数前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:25px;white-space:normal;"> 在图集内容调用图集的时候,如果使用某些Box-sizing:border-Box;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">幻灯片特效或者jquery插件,难免会用到ID编号什么的,本教程将教会你如何给图集图片自动编号,也就是说,让{dede:productimagelist}标签支持自动编号,非常简单。

Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;"> 打开include/taglib/productimagelist.lib.PHP文件,找到:

Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;">

  1. LoadSource($innerText);

Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;"> 在其后面另起一行加入

Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;">

  1. PHP">$GLOBALS['autoindex'] = 0;

Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;"> 找到:

Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;">

  1. GetResult();

Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;">

  1. PHP">$GLOBALS['autoindex']++;

Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;"> 这里的改动就算完了,接下来是内容页里调用

Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;">

  1. Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;">

  2. 例子:

  3.  
  4. Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;">

  5.  
  6. {/dede:productimagelist} 
  7. Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;">

  8. 结果:

  9.  
  10. Box-sizing:border-Box;margin-top:0px;margin-bottom:16px;color:#444444;font-family:'Microsoft Yahei',sans-serif;font-size:15px;line-height:25px;white-space:normal;">

  11.  
  12.  
  13.  
  14. ...... 

猜你在找的Dedecms相关文章