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='".$this->indexUrl."'>".$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['reid']!=0) { //调用递归逻辑 $this->LogicGetPosition($this->TypeInfos['reid'],true); } $this->valuePosition = $indexpage.$this->SplitSymbol.$this->valuePosition; return $this->valuePosition.$this->SplitSymbol; //需要修改这里..... } else { $this->valuePositionName = $this->TypeInfos['typename']; if($this->TypeInfos['reid']!=0) { //调用递归逻辑 $this->LogicGetPosition($this->TypeInfos['reid'],false); } return $this->valuePositionName; } } }
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:
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!