Dede List page Call article description compared with simple label [Field:description function= ' Cn_substr (@me, 180) '/] 180 is the number of words
Another way is to invoke the content of the body of the article call in the list page instead of the description, this need to do two times to develop as follows (Beta version dede5.7 GBK November 4, 2015)
Add the following custom function in include/extend.func.php
| 123456789101112131415 |
function Getonearchivebody ($aid, $length) {global $dsql; $aid = Trim (ereg_replace (' [^0-9] ', ' ", $aid)); $body ="; $query = "Select Art.body from ' dede_addonarticle ' art, ' dede_archives ' arc where art.aid= ' $aid ' and art.aid=arc.id '; $arcRow = $d Sql->getone ($query), if (!is_array ($arcRow)) {return $body;} if (Isset ($arcRow [' body ')]) {$body = Cn_substr ($arcRow [' body '], $length);} return $body;} |
The list uses [Field:id function=] Getonearchivebody (@me, 1000) "/" Call, and 1000 is the number of words to call
The above call is not filtered in the body HTML if you need to filter then put
| 1 |
$body = Cn_substr ($arcRow [' body '], $length); |
Replaced by
| 1 |
$body = Cn_substr (Html2text ($arcRow [' body ']), $length); |
You can filter out the HTML.
If there is a problem, please contact the technical.
Dede List page Call article body content