dedecms织梦tag+keyword调用相关文章(6)

                $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl'];

                $row['memberurl'] = $GLOBALS['cfg_memberurl'];

                $row['templeturl'] = $GLOBALS['cfg_templeturl'];

                 

                if(is_array($dtp2->CTags))

                {

                    foreach($dtp2->CTags as $k=>$ctag)

                    {

                        if($ctag->GetName()=='array') {

                            $dtp2->Assign($k,$row);

                        }

                        else {

                            if(isset($row[$ctag->GetName()])) $dtp2->Assign($k,$row[$ctag->GetName()]);

                            else $dtp2->Assign($k,'');

                        }

                    }

                    $GLOBALS['autoindex']++;

                }

 

                $artlist .= $dtp2->GetResult()."\r\n";

            }

            //if hasRow

            else

            {

                $artlist .= '';

            }

            if($col>1) $artlist .= "    </td>\r\n";

        }

        //Loop Col

        if($col>1) $i += $col - 1;

        if($col>1) $artlist .= "    </tr>\r\n";

    }

    //loop line

    if($col>1) $artlist .= "    </table>\r\n";

    $dsql->FreeResult("al");

    return $artlist;}

 

前台模板调用

1

2

3

4

5

6

7

8

9

10

11

12

13

 

{dede:liketags row='3' mytypeid='6' eregtype='all|tag|keyword' titlelen='250' infolen='250'}

<li>

<a href="[field:arcurl/]" title="[field:title/]" target="_blank">

<div>

<img src="[field:litpic/]" alt="[field:title/]"/>

</div>

<div>

<p>[field:title/]</p>

<p>[field:description /]</p>

</div>

</a>

</li>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/a8ed2510537ace817c52361cce816597.html