Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
Many people use Dedecms imitation station, will use in the current Column page, column title using the specified style (title highlighted, or put a background map). This is a very common and useful function, such as in the navigation page, identify which column is currently browsing. (Figure 1)
(Figure 1)
But sometimes, when we call several articles, we need to highlight the title of the current article. (Figure 2) but Dedecms does not have this function, below I share a few pieces of code, to realize this function.
(Figure 2)
The files that need to be modified are: include/taglib/arclist.lib.php
Insert in line 65: $currentstyle = $ctag->getatt (' Currentstyle ');
Second, after the $isweight of line 135, add: $currentstyle
Third, in the 170 lines of $isweight= ' N ' and "plus:, $currentstyle = '
Four, insert below 519 lines:
if ($currentstyle && $row [' id ']== $arcid) {
$currentstyle = Str_replace (' ~typelink~ ', $row [' filename '], $currentstyle);
$row [' currentstyle '] = str_replace (' ~typename~ ', $row [' title '], $currentstyle);
}
If you are worried about your own changes will be wrong, you can go to Http://qinglvshuo.com/static/dede.rar download the author modified the file. After modifying this file, the calling code is as follows:
{dede:arclist titlelen= ' row= ' currentstyle= '
~typename~
"}
[Field:array runphp= ' yes ']
if (@me [' currentstyle ']) {
@me = @me [' Currentstyle '];
}else{
@me = "
{@me [' title ']}
";
}
[/field:array]
{/dede:arclist}
The title of the article in your code, the number of lines, and the style name can be modified according to your needs.
This article by the couple store http://qinglvshuo.com original, A5 starting, hope to need this function webmaster bring help. Welcome to the Webmaster Reservation link reproduced.