How to display thumbnails in the Dreamweaver list if there are thumbnails?
If there is a thumbnail in the DEDECMS list, the thumbnail will be displayed. If there is no thumbnail, the image will not be displayed.
Recommended learning: 梦Weavercms
Many friends who use DEDECMS to build websites want to implement this function. Sometimes articles may not always be equipped with pictures, so they want to display thumbnails if there are thumbnails, and not display pictures if there are no thumbnails.
You can modify the implementation according to the following method, open the file (this is the default template)
Find the following code:
[field:array runphp='yes']@me = (emptyempty(@me['litpic']) ? "" : "<a class="preview" href="{@me["><img src="{@me[" alt="" /></a>"); [/field:array]
Replace it with the following code:
[field:array runphp='yes']@me = (strpos(@me['litpic'],'defaultpic') ? "" : "<a href='{@me['arcurl']}' class='preview'><img src='{@me['litpic']}'/></a>"); [/field:array]
Then regenerate the list page again.
The above is the detailed content of How to realize that if there are thumbnails in the Dreamweaver list, the thumbnails will be displayed. For more information, please follow other related articles on the PHP Chinese website!