Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of calling the first picture of the article content on the DEDE list page

Shulou Source: shulou.com Published: 2022-06-02 04:59:58 11月13日 Update

The DEDE list page calls the method of the first picture of the article content? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

How does the DEDE list page call the first picture of the article content?

The DEDE list page calls the first picture (non-thumbnail) method of the article content

Recommended study: dream weaving cms

Open.. / include/ common.func.php

Add code

/ / convert the thumbnail into the first picture of the article function firstimg ($str_pic) {$str_sub=substr ($str_pic,0,-7). ".jpg"; / / delete the last seven digits of the thumbnail string, and then add the suffix .jpg return $str_sub;}

The method to be called is:

[field:litpic function='firstimg (@ me)'/] Thank you for reading! After reading the above, do you have a general idea of how to call the first picture of the article on the DEDE list page? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.

Tags: Content articles pictures methods questions learning codes suffixes characters strings more watch industry information channels channels references work help recommendations Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple OPPO Reno NVidia vpn MariaDB