Dede:field name=position removes the last method greater than the symbol
This article mainly introduces the method of removing the last greater than symbol by dede:field name=position, which is very detailed and has a certain reference value. Friends who are interested must read it!
How does dede:field name=position remove the last greater than symbol?
Dede provides the function of bread crumbs. But there is always a'> 'symbol at the end. It's very annoying. Here's a good way to kill it.
Things:
Dede provides the function of bread crumbs. But there is always a'> 'symbol at the end. It's very annoying. Target, kill it.
The first solution: 1. Modify this symbol in the system parameters.
The second solution: 2. Use truncation, runphp operation (there are many Baidu online, it is a pity that I did not succeed in the experiment).
The third solution: 3. Modify the underlying code. The one I have used has been tested and can be used.
Resolve:
Find the include/typelink.class.php file.
Find the following way.
The code is as follows:
/ / get a list of purpose links such as: category 1 > > category 2 > > such a form / / islink indicates whether the returned list has a connection function GetPositionLink ($islink=true) {$indexpage = ". $this- > indexName."; if ($this- > valuePositionist = "" & & $islink) {return $this- > valuePosition;} else if ($this- > valuePositionNameplate = "" & &! $islink) {return $this- > valuePositionName;} else if ($this- > TypeID==0) {if ($islink) {if ($indexpage) } else {return "No category specified!" ;} else {if ($islink) {$this- > valuePosition = $this- > GetOneTypeLink ($this- > TypeInfos); if ($this- > TypeInfos ['reid']! = 0) {/ / call recursive logic $this- > LogicGetPosition ($this- > TypeInfos [' reid'], true);} $this- > valuePosition = $indexpage.$this- > SplitSymbol.$this- > valuePosition; return $this- > valuePosition.$this- > SplitSymbol; / / need to be modified here. } else {$this- > valuePositionName = $this- > TypeInfos ['typename']; if ($this- > TypeInfos [' reid']! = 0) {/ / call recursive logic $this- > LogicGetPosition ($this- > TypeInfos ['reid'], false);} return $this- > valuePositionName;}
Change the above line to be modified like this: return $this- > valuePosition
5. The {dede:field name='position'/} of the final template call. The final effect is as follows:
These are all the contents of dede:field name=position 's last method that is greater than the symbol. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!