Home> CMS Tutorial> DEDECMS> body text

How to add alt attribute to article thumbnail on DreamWeaver cms list page

藏色散人
Release: 2020-01-03 09:32:32
Original
2242 people have browsed it

How to add alt attribute to article thumbnail on DreamWeaver cms list page

How to add the alt attribute to the article thumbnail on the DreamWeaver cms list page?

How to add alt attributes to the article thumbnails on the list page of Dreamweaver cms

Recommended learning:Dreamweaver cms

This method, It can better improve the related settings of on-site optimization, just like the automatic ALT annotation plug-in for article pictures we developed, which is also conducive to image optimization to bring traffic.

Existence of problems

The thumbnail image of the default DedeCms default list page lacks the ALT attribute, which is poor for search engines to recognize the image.

Solution

Findin the list_article.htm list page template and add it ALT attribute.

After modification:{@me[

Note: By the way, the width and height attributes are added to the image.

After the modification, a new problem appeared. That is, when an article is recommended, the code has an additionaltag.

Solution:

Modify the /include/arc.listview.class.php file and find the following code (v5.6 is line 745)

$row['title'] = "".$row['title']."";
Copy after login

Modify to:

$row['title'] = $row['title'];
Copy after login

The above is the detailed content of How to add alt attribute to article thumbnail on DreamWeaver cms list page. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!