导航:首页 > 万维百科 > 帝国cms按照副标题调用栏目列表

帝国cms按照副标题调用栏目列表

发布时间:2020-11-18 14:52:16

1、帝国cms灵动标签调用指定的栏目名称地址和5条新闻标题

你直接在帝国后台上点击自动生成标签,然后设置好,自动生成。拷贝那段代码。

[e:loop={2,10,1,0}]
<a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a> <br>
[/e:loop]

[e:loop={2,10,1,0}]这句就是循环的开始
<a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a> <br>
[/e:loop]这句就是循环的结束

然后你按照你的div+css看那里要循环。把这些替换就可以了

2、帝国cms首页多表调用,要调用栏目缩略图+标题。

本来不想回答 去年做过项目4表联合 拿去自己改吧 不会改就没办法 不解释

[e:loop={'select * 
from 
(
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news where istop=1 order by newstime desc limit 13 )
Union All
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news1 where istop=1 order by newstime desc limit 13)
Union All
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news2 where istop=1 order by newstime desc limit 13)
Union All
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news3 where istop=1 order by newstime desc limit 13)
)  as A  order by newstime desc  limit 20',0,24,0}]
<?php
$fb=$empire->fetch1("select * 
from 
(
(select id,classid,smalltext from phome_ecms_news_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,smalltext from phome_ecms_news1_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,smalltext from phome_ecms_news2_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,smalltext from phome_ecms_news3_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
)  as A");
?>
<li class="clearfix">
<a target='_blank' href="<?=$bqr[titleurl]?>" title="<?=$bqr[title]?>" class="index-img"><img src="<?=$bqr[titlepic]?$bqr[titlepic]:'404.jpg'?>" alt="<?=$bqr[title]?>"></a>
<div class="index-text">
<h1><a target='_blank' href="<?=$bqr[titleurl]?>"><?=$bqr[title]?></a>
</h1>
<div class="index-con"></div>
<div class="index-intro"><a target="_blank" href="<?=$bqr[titleurl]?>?from=index_new_intro"><?=$fb[smalltext]?></a></div>
<div class="index-like clearfix">
<span class="time">
 <?php
$fr=$empire->fetch1("select * 
from 
(
(select id,classid,infotags from phome_ecms_news_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,infotags from phome_ecms_news1_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,infotags from phome_ecms_news2_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,infotags from phome_ecms_news3_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
)  as A");
            $keyr=explode(',',$fr[infotags]);
            for($i=0;$i<2;$i++)
            {
            echo'<span><a href="/liaotian/tags-'.$keyr[$i].'-0.html" target=_blank>'.$keyr[$i].'</a></span>&nbsp;&nbsp;';
            }
            ?>
</span>
<span class="time"><?=format_datetime($bqr[newstime],"m-d")?></span>
<div class="post-ope">
<a href="/e/public/digg/?classid=<?=$bqr[classid]?>&id=<?=$bqr[id]?>&dotop=1&ajaxarea=diggnum<?=$bqr[id]?>" class="post-like-btn post-like" id="post-like-top-btn">
<script>
document.write('<script src="/e/public/ViewClick/?classid=<?=$bqr[classid]?>&id=<?=$bqr[id]?>&down=5?t='+Math.random()+'"><'+'/script>');
</script>
</a>
</div>
</div>
</div>
</li>

[/e:loop]

功能:联合取4表数据 关联取附表简介 并取标签 附加顶功能 动态浏览量等

3、帝国cms 副标题怎么调用,有整理的调用标签留一份哦!

在 e:loop 标签中 调用方法为:<?=$bqr[ftitle]?>

帝国CMS副标题直接使用 [!--ftitle--]

4、帝国cms怎么调用栏目的目录名

填写目录的url或者用[!--this.classlink--]

灵动标签:

栏目名:  <?=$class_r[ID]['classname']?>
栏目连接:  <?=$public_r['newsurl']?><?=$class_r[000]['classpath']?> 
别名:    <?=$class_r[ID]['bname']?>

希望能帮到你

5、帝国cms灵动标签怎么调用某一子栏目

[e:loop={'select classid,classname,classpath from [!db.pre!]enewsclass where bclassid=1 and showclass=0 order by myorder,classid desc',0,24,0}]
<li><a href="<?=$public_r[newsurl]?><?=$bqr[classpath]?>" title="<?=$bqr[classname]?>" target="_blank"><?=$bqr[classname]?></a></li>
[/e:loop]

可以实现帝国CMS用灵动标签来实现任意页面调用指定栏目下的所有子栏目。
这段JS是用以实现当前栏目高亮的样式区分,如不需要当前子栏目高亮,可删除这段JS代码。

6、如何调用栏目名及连接 帝国cms

[e:loop={"select * from {$dbtbpre}enewsclass where modid = 1 order by myorder",100,24,0}]
<a href="[!--news.url--]<?=$bqr[classpath]?>/"><?=$bqr[classname]?></a>
[/e:loop]

modid = 1  :这个是数据表的ID,默认的数据表是   新闻系统数据表,ID为1

7、帝国CMS怎样调用如下图,在文章前面加个栏目名称

栏目名称标签

[!--class.name--] :栏目名称(带链接)

[!--this.classname--] :栏目名称(不带链接)


看你的标签[ecmsinfo]0,10,28,1,4,2,0[/ecmsinfo]用的是标签模板里ID为2 的 《标题列表模板》
点击标题列表模板后面的修改,

在“列表内容模板(list.var) (*)”里把栏目名称标签加上


如:

<li>[!--class.name--]<a href="[!--titleurl--]" title="[!--oldtitle--]">[!--title--]</a></li>

8、帝国Cms怎么实现调用网站一级栏目和二级栏目做为网站导航

修改头文件,具体代码如下

<nav class="nav">
<ul class="nav__menu">
<li class="nav__menu-item"><a href="[!--news.url--]" target="_self">首页</a></li>
<?php
$ecms_bq_sql=sys_ReturnEcmsLoopBq('select classid,classname,classpath from [!db.pre!]enewsclass where bclassid=0 and showclass=0 order by myorder limit 8',20,24,0); $bqno=0;
while($bqr=$empire->fetch($ecms_bq_sql))
{
$bqsr=sys_ReturnEcmsLoopStext($bqr);
$bqno++;
if($bqr[classid] != '23' ){
?>

<li class="nav__menu-item"><a href="<?=$public_r[newsurl]?><?=$bqr[classpath]?>" title="<?=$bqr[classname]?>" target="_self" ><?=$bqr[classname]?></a>
<ul class="nav__submenu">
<?php
$ecms_bq_sql2=sys_ReturnEcmsLoopBq("select classid,classname,classpath from [!db.pre!]enewsclass where bclassid='$bqr[classid]' order by myorder limit 5",20,24,0);
$bqno2=0;
while($bqr2=$empire->fetch($ecms_bq_sql2))
{
$bqsr2=sys_ReturnEcmsLoopStext($bqr2);
$bqno2++;
?>
<li class="nav__submenu-item"><a href="<?=$public_r[newsurl]?><?=$bqr2[classpath]?>" title="<?=$bqr2[classname]?>" target="_self" ><?=$bqr2[classname]?></a></li>
<?php
}
?>
</ul>
</li>

<?php
}
}
?>
</ul>
</nav>

9、帝国CMS灵动标签调用指定栏目的问题

使用灵动标签首先要在系统参数设置---信息设置---模板支持程序代码(开启)
灵动标签 (e:loop)的格式:
[e:loop={栏目ID/专题ID,显示条数,操作类型,只显示有标题图片,附加SQL条件,显示排序}]模板代码内容[/e:loop]
实例3:如果信息带有图片信息,则标题上带有图片标志
[e:loop=
{'selfinfo',20,0,0}]<?$newimg="";if(!empty($bqr[titlepic]))
{ $newimg="<img src='http://bbs.zhnews.net/bbs/static/image
/filetype/image_s.gif' />";}?><tr class="even"><
td class="title"><h1><a href="<?=$bqsr[titleurl]?&
gt;" target="_blank"><?=sub($bqr[title],0,24,false)?></a&
gt;<?=$newimg?></h1><p class="intro">&
lt;?=$bqr[smalltext]?>[<a title="阅读全文" href="&
lt;?=$bqsr[titleurl]?>" target="_blank">详细内容</a>]</p>&
lt;/td><td><?=$bqr[myarea]?></td><td><?=date('Y-m-d H:i:s', $bqr[newstime])?></td></tr>[/e:loop]

与帝国cms按照副标题调用栏目列表相关的知识