Home CMS Tutorial DEDECMS How to remove the last greater than sign in dede:field name=position

How to remove the last greater than sign in dede:field name=position

Dec 10, 2019 am 10:12 AM
dede

How to remove the last greater than sign in dede:field name=position

dede:field name=position How to remove the last greater than symbol?

dede provides the breadcrumb function . But there is always a '>' symbol at the end. It’s very annoying, here’s a good way to get rid of it

Recommended learning:梦Weavercms

Things:

dede provides breadcrumbs function. But there is always a '>' symbol at the end. Very annoying. Target to kill it.

The first solution: 1. Modify this symbol in the system parameters.

The second solution: 2. Use the truncation character and runphp operation (there are many on Baidu on the Internet, but unfortunately I did not test successfully).

The third solution: 3. Modify the underlying code. (This is what I used and tested, and it works).

Solution:

Find the include/typelink.class.php file.

Find the method below.

The code is as follows:

//获得某类目的链接列表 如:类目一>>类目二>> 这样的形式 
//islink 表示返回的列表是否带连接 
function GetPositionLink($islink=true) 
{ 
$indexpage = "<a href=&#39;".$this->indexUrl."&#39;>".$this->indexName."</a>"; 
if($this->valuePosition!="" && $islink) 
{ 
return $this->valuePosition; 
} 
else if($this->valuePositionName!="" && !$islink) 
{ 
return $this->valuePositionName; 
} 
else if($this->TypeID==0) 
{ 
if($islink) 
{ 
return $indexpage; 
} 
else 
{ 
return "没指定分类!"; 
} 
} 
else 
{ 
if($islink) 
{ 
$this->valuePosition = $this->GetOneTypeLink($this->TypeInfos); 
if($this->TypeInfos[&#39;reid&#39;]!=0) 
{ 
//调用递归逻辑 
$this->LogicGetPosition($this->TypeInfos[&#39;reid&#39;],true); 
} 
$this->valuePosition = $indexpage.$this->SplitSymbol.$this->valuePosition; 
return $this->valuePosition.$this->SplitSymbol; //需要修改这里..... 
} 
else 
{ 
$this->valuePositionName = $this->TypeInfos[&#39;typename&#39;]; 
if($this->TypeInfos[&#39;reid&#39;]!=0) 
{ 
//调用递归逻辑 
$this->LogicGetPosition($this->TypeInfos[&#39;reid&#39;],false); 
} 
return $this->valuePositionName; 
} 
} 
}
Copy after login

Change the above line that needs to be modified to this: return $this->valuePosition;

5. The final template call {dede:field name='position'/}. The final rendering is as follows:

How to remove the last greater than sign in dede:field name=position

The above is the detailed content of How to remove the last greater than sign in dede:field name=position. For more information, please follow other related articles on the PHP Chinese website!

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

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)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)