各类知识收集,PHP技术分享与解决方案各类知识收集,PHP技术分享与解决方案各类知识收集,PHP技术分享与解决方案

Str Tom,为分享PHP技术和解决方案,贡献一份自己的力量!
收藏本站(不迷路),每天更新好文章!
当前位置:首页 > CMS教程 > dedecms

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

管理员 2014-12-18
dedecms
102
 代码如下


    {dede:list perpage='20'}  
                        <div class="f-con01">  
                            <div class="f-con01-l">  
                                <a><img src="/templets/qiba/images/con01-f.jpg"></a>  
                            </div>  
                            <div class="f-con01-r">  
                                <p class="a6"><a href="[field:arcurl/]" target="_blank">[field:title/]</a></p>  
                                <p><a>[field:description/]...</a></p>  
                                <dl>  
                                    <dt>地址:</dt>  
                                    <dd>[field:id runphp="yes"]  
                                            $dsql = new DedeSql(false);  
                                            $sql="SELECT qiba.address from `dede_addonqiba` as qiba where qiba.aid=@me";  
                                            $arcRow = $dsql->GetOne($sql);  
                                            @me=''.$arcRow['address'].'';  
                                        [/field:id]</dd>  
                                    <dt>乘车路线:</dt>  
                                    <dd>[field:id runphp="yes"]  
                                            $dsql = new DedeSql(false);  
                                            $sql="SELECT qiba.roadline from `dede_addonqiba` as qiba where qiba.aid=@me";  
                                            $arcRow = $dsql->GetOne($sql);  
                                            @me=''.$arcRow['roadline'].'';  
                                        [/field:id]</dd>  
                                </dl>  
                                <dl>  
                                    <dt>电话:</dt>  
                                    <dd>[field:id runphp="yes"]  
                                            $dsql = new DedeSql(false);  
                                            $sql="SELECT qiba.telephone from `dede_addonqiba` as qiba where qiba.aid=@me";  
                                            $arcRow = $dsql->GetOne($sql);  
                                            @me=''.$arcRow['telephone'].'';  
                                        [/field:id]</dd>  
                                </dl>  
                            </div>  
                            <div class="f-con01-b">  
                                <div class="star">  
                                    <p>评分:</p>  
                                    [field:id runphp="yes"]  
                                            @me=rating_bar(@me,5);  
                                        [/field:id]  
                                </div>  
                            </div>  
                            <div class="clear"></div>  
                        </div>  
                        {/dede:list}  

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关推荐

扫码关注

qrcode

QQ交谈

回顶部