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

藏色散人
Release: 2019-12-10 10:12:21
Original
2959 people have browsed it

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!

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template