标题分类名称、关键词、地址、ID | |
---|---|
标签调用 | $r变量 |
ID:[!--ttid--] | $r[ttid]、$navinfor[ttid] |
地址:[!--tt.url--] | |
灵动标签地址 <?=sys_ReturnBqInfoTypeUrl($bqr[ttid])?> |
|
名称:[!--tt.name--] | |
<?=$_nowtype[tname]?> <?=$class_tr[$bqr[ttid]][tname]?> |
|
程序代码:$r变量+SQL语句 关键词:'.$_nowtype[pagekey].' 名称:'.$_nowtype[tname].' 地址:'.$_nowtype[tpath].' 地址:<?=$navinfor[ttid]?> |
1、帝国cms模板中如何调用标题分类关键词、标题分类地址、标题分类名称?
方法一:标签调用
ID:[!--ttid--] 、地址:[!--tt.url--]、名称:[!--tt.name--]
列表内容模板(list.var) (*)
方法1:$r变量+SQL语句
1 2 3 4 5 6 |
$_nowtype = $empire ->fetch1( "select * from {$dbtbpre}enewsinfotype where typeid='$r[ttid]'" ); $listtemp =' 标题分类关键词: '.$_nowtype[pagekey].' 标题分类名称带链接:<a href= "[!--news.url--]'.$_nowtype[tpath].'/" rel= 'noopener external nofollow' target= '_blank' title= "'.$_nowtype[tname].'" > '.$_nowtype[tname].' </a> 标题分类ID: '.$r[ttid].' '; |
方法:$navinfor变量+SQL语句
1 2 |
<?php $_nowtype = $empire ->fetch1( "select * from {$dbtbpre}enewsinfotype where typeid='$navinfor[ttid]'" );?> <?= $_nowtype [pagekey]?> |
方法:$navinfor变量+SQL语句
1 2 |
<?php $_nowtype = $empire ->fetch1( "select * from {$dbtbpre}enewsinfotype where typeid='$navinfor[ttid]'" );?> 标题分类名称带链接:<a href= "[!--news.url--]<?=$_nowtype[tpath]?>/" rel= 'noopener external nofollow' target= '_blank' title= "<?=$_nowtype[tname]?>" ><?= $_nowtype [tname]?></a> |
方法2:$navinfor变量+SQL语句
1 2 |
<?php $_nowtype = $empire ->fetch1( "select * from {$dbtbpre}enewsinfotype where typeid='$navinfor[ttid]'" );?> <?= $_nowtype [tname]?> |
帝国cms内容模板 如何调用标题分类ID?
1 2 3 4 |
方法1:标签调用;[!--ttid--] 方法2: $navinfor 变量: $navinfor [ttid] tips:在内容页输出 $navinfor 变量,需要结合php简写标签, 如:<?= $navinfor [ttid]?> |
方法1:SQL调用
1 2 |
<?php $_type = $empire ->fetch1( "select * from {$dbtbpre}enewsinfotype where typeid='$GLOBALS[navclassid]'" );?> <?= date ( 'Y-m-d' , $_type [fclast])?>T<?= date ( 'H:i:s' , $_type [fclast])?> |
7、帝国cms列表页面模板,如何调用标题分类链接
方法1:$class_tr变量
1 2 |
[!--news.url--]<?= $class_tr [ $GLOBALS [navclassid]][tpath]?>/ 或[!--news.url--]<?= $class_tr [ $navclassid ][tpath]?>/ |
方法2:SQL调用
1 2 |
<?php $_type = $empire ->fetch1( "select * from {$dbtbpre}enewsinfotype where typeid='$GLOBALS[navclassid]'" );?> <?= $_type [tpath]?> |
说明:列表页面模板-标题分类链接不支持标签调用
8、帝国cms列表页面模板 如何调用标题分类图片?
方法1:标签调用
1 | [!-- class .classimg--] |
方法2:SQL调用
1 2 |
<?php $_type = $empire ->fetch1( "select * from {$dbtbpre}enewsinfotype where typeid='$GLOBALS[navclassid]'" );?> <?= $_type [timg]?> |
9、帝国cms列表页面模板 如何调用标题分类简介?
方法1:标签调用
1 | [!--pagedes--]或[!-- class .intro--] |
方法2:SQL调用
1 2 |
<?php $_type = $empire ->fetch1( "select * from {$dbtbpre}enewsinfotype where typeid='$GLOBALS[navclassid]'" );?> <?= $_type [intro]?> |
10、帝国cms列表页面模板 如何调用标题分类关键词?
方法1:标签调用
1 | [!--pagekey--]或[!-- class .keywords--] |
方法2:SQL调用
1 2 |
<?php $_type = $empire ->fetch1( "select * from {$dbtbpre}enewsinfotype where typeid='$GLOBALS[navclassid]'" );?> <?= $_type [pagekey]?> |
11、帝国cms列表页面模板 如何调用标题分类名称?
方法1:标签调用
1 | [!--pagetitle--] |
方法2:$class_tr变量
1 2 3 |
<?= $class_tr [ $GLOBALS [navclassid]][tname]?> 或 <?= $class_tr [ $navclassid ][tname]?> |
方法3:SQL调用
1 2 |
<?php $_type = $empire ->fetch1( "select * from {$dbtbpre}enewsinfotype where typeid='$GLOBALS[navclassid]'" );?> <?= $_type [tname]?> |
12、帝国cms列表页面模板 如何调用标题分类ID?
方法1:标签调用
1 | [!--self.classid--] |
方法2:系统变量
1 | <?= $GLOBALS [navclassid]?>或<?= $navclassid ?> |
方法3:$class_tr变量
1 2 |
<?= $class_tr [ $GLOBALS [navclassid]][typeid]?> 或<?= $class_tr [ $navclassid ][typeid]?> |
方法4:SQL调用
1 2 |
<?php $_type = $empire ->fetch1( "select * from {$dbtbpre}enewsinfotype where typeid='$GLOBALS[navclassid]'" );?> <?= $_type [typeid]?> |