search
HomeCMS TutorialDEDECMSHow to cut the title length of DEDECMS articles

How to cut the title length of DEDECMS articles

DEDECMS How to cut the title length of an article?

Friends who know dedecms must be very familiar with how to get the tags of the previous and next articles. The tags for dedecms to obtain the previous and next articles are: {dede:prenext get='pre'/}, {dede:prenext get='next'}.

Recommended: "dedecms usage tutorial"

In this tag, there is no function to set the number of words in the title of the previous and next article, so what should we do? How to implement such a function? In fact, the dedecms system has also done a good job in this regard and has considered it very carefully. This can be set up.

dedecms method to set the number of words in the title of the previous and next article:

Step 1: Find the "include/arc.archives.class.php" file under dedecms, use DW or Notepad opens.

Step 2: Find $this->PreNext['pre']="Previous article:{$preRow['title']}"; Add $preRow['title to this line ']=cn_substr($preRow['title'],30); , 30 means 30 bytes, which is 15 Chinese characters. This can be set by yourself according to the actual situation.

Step 3: Find $this->PreNext['next']="Next article:{$nextRow['title']}"; Add $nextRow['title to this line ']=cn_substr($nextRow['title'],30); .

Then save it. At this point, dedecms’ method of setting the number of words in the title of the previous and next article is completed.

The above is the detailed content of How to cut the title length of DEDECMS articles. For more information, please follow other related articles on the PHP Chinese website!

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment