A few days ago, a friend asked me to help me use dedecms to call pictures to realize the effect of Taobao product display. This address is an effect demonstration, and I feel that the effect is still OK. Share the demo source code belowhttp://pan.baidu.com/s/1oYEoR?。Everyone has seen the effect. Let me explain how to call it with dedecms.Dream Weaving CMS If there are pictures in the published document, the system defaults to the first thumbnail. Even if there are multiple pictures in your document, only one picture will be displayed. So how to call all pictures in the current document?
I made some attempts and found that I could use the following tag to call:
{dede:sql sql=”select * from dede_uploads where arcid = ~id~”}<img src=”[field:url/]” />{/dede:sql}
This is the code for dedecms to call all pictures in the current document. The code in the demo is as follows
<div id=spec-list>
<ul>
<li><img src=”img1/001.jpg”> </li>
<li><img src=”img1/002.jpg”> </li>
<li><img src=”img1/003.jpg”> </li>
<li><img src=”img1/004.jpg”> </li>
<li><img src=”img1/005.jpg”> </li>
<li><img src=”img1/006.jpg”> </li>
<li><img src=”img1/007.jpg”> </li>
<li><img src=”img1/008.jpg”> </li>
<li><img src=”img1/010.jpg”> </li>
<li><img src=”img1/009.jpg”> </li>
</ul>
</div>
Just set<li><img src="img 1/001.jpg"></li>
<li><img src=”img1/002.jpg”> </li>
<li><img src=”img1/003.jpg”> </li>
<li><img src=”img1/004.jpg”> </li>
<li><img src=”img1/005.jpg”> </li>
<li><img src=”img1/006.jpg”> </li>
<li><img src=”img1/007.jpg”> </li>
<li><img src=”img1/008.jpg”> </li>
<li><img src=”img1/010.jpg”> </li>
<li><img src=”img1/009.jpg”> </li>
Change it to {dede:sql="select * from dede_uploads where arcid = ~id~"}<li><img src="[field:url/]"/></li>{/dede:sql}, which I have tested and is very powerful. As for the default big picture for opening the page, it is this code
<div id=spec-n1 onClick=”window.open(‘#’)”>
<IMG width=350 height=340 src=”img1/001.jpg” jqimg=”img1/001.jpg” >
</div>Call the thumbnail of the document directly with dedecms. The code is as follows: <div id= spec-n1onClick ="window.open ('#')"> <IMG ? width=350 height=340 src=”{dede:field.litpic /}”jqimg=”{dede:field.litpic /}” > </div>
If there is anything else you can understand, you can talk to me privately. My online contact information is on the front page of the website. Jinan Great God welcomes your consultation