在dede:arclist、dede:list等标签中调用附加字段

时间:2021-11-08 12:04:52

 

 
01 {dede:list perpage='20'
02                     <div class="f-con01"
03                         <div class="f-con01-l"
04                             <a><img src="/templets/qiba/images/con01-f.jpg"></a> 
05                         </div> 
06                         <div class="f-con01-r"
07                             <p class="a6"><a href="[field:arcurl/]"target="_blank">[field:title/]</a></p> 
08                             <p><a>[field:description/]...</a></p> 
09                             <dl> 
10                                 <dt>地址:</dt> 
11                                 <dd>[field:id runphp="yes"
12                                         $dsql = new DedeSql(false); 
13                                         $sql="SELECT qiba.address from `dede_addonqiba` as qiba where qiba.aid=@me"
14                                         $arcRow = $dsql->GetOne($sql); 
15                                         @me=''.$arcRow['address'].''
16                                     [/field:id]</dd
17                                 <dt>乘车路线:</dt> 
18                                 <dd>[field:id runphp="yes"
19                                         $dsql = new DedeSql(false); 
20                                         $sql="SELECT qiba.roadline from `dede_addonqiba` as qiba where qiba.aid=@me"
21                                         $arcRow = $dsql->GetOne($sql); 
22                                         @me=''.$arcRow['roadline'].''
23                                     [/field:id]</dd
24                             </dl> 
25                             <dl> 
26                                 <dt>电话:</dt> 
27                                 <dd>[field:id runphp="yes"
28                                         $dsql = new DedeSql(false); 
29                                         $sql="SELECT qiba.telephone from `dede_addonqiba` as qiba where qiba.aid=@me"
30                                         $arcRow = $dsql->GetOne($sql); 
31                                         @me=''.$arcRow['telephone'].''
32                                     [/field:id]</dd
33                             </dl> 
34                         </div> 
35                         <div class="f-con01-b"
36                             <div class="star"
37                                 <p>评分:</p> 
38                                 [field:id runphp="yes"
39                                         @me=rating_bar(@me,5); 
40                                     [/field:id
41                             </div> 
42                         </div> 
43                         <div class="clear"></div> 
44                     </div> 
45                     {/dede:list}



AiteCms,企业模板快速建站专家,点击了解更多

转载自织梦模板教程(www.dede58.com