5 个回复
CMSYOU - CMS企业网站定制专家
赞同来自:
{dede:global.cfg_basehost/}{dede:geturl runphp='yes'}@me = GetCurUrl();{/dede:geturl}
{dede:global.cfg_basehost/}{dede:php}$thisid = $refObj->Fields['id'];
$arcurl = GetOneArchive($thisid);
echo $arcurl['arcurl'];{/dede:php}
CMSYOU - CMS企业网站定制专家
赞同来自:
{dede:sql sql='Select * from dede_archives where id=~id~'}
<img src="[field:litpic/]" alt="[field:title/]" style="max-height:150px; max-width:170px;" />
{/dede:sql}
{dede:sql sql='Select down,title from dede_addonarticle JOIN dede_archives ON dede_addonarticle.aid = dede_archives.id where id = ~id~'}
<a href='[field:down/]' target='_blank'>[field:title/]</a>
{/dede:sql}
CMSYOU - CMS企业网站定制专家
赞同来自:
[field:senddate runphp='yes']
$ntime = time();
$oneday = 3600 * 24;
if(($ntime - @me)<$oneday)
@me = "<font color='red'>(new)</font>";
else @me = "";
[/field:senddate]
{dede:field name=typeid runphp="yes"}
global $dsql;
$sql = "SELECT id From `dede_arctype` WHERE reid='@me' And ishidden<>1 order by sortrank asc limit 0, 100 ";
$row = $dsql->GetOne($sql);
if(@me=is_array($row))
@me="有子栏目";
else @me = "没子栏目";
{/dede:field}
CMSYOU - CMS企业网站定制专家
赞同来自:
{dede:field.id/}
{dede:field name='aid'}{/dede:field}
{dede:arclist row='6' titlelen='20' imgwidth='80' imgheight='107' addfields='body' typeid='15' channelid='1'}
<div class="il_1">
<div class="img">
<img src="[field:litpic/]" />
<!-- <a href="[field:shorttitle/]" class="butten" target="_blank">查看详细</a>
-->
[field:shorttitle runphp=yes]
$fields = @me;
if($fields != ''){
@me = '<a href="'.$fields.'" class="butten" target="_blank">查看详细</a>';
}else{
@me = '<a class="butten" target="_blank">敬请期待</a>';
}
[/field:shorttitle]
</div>
<div class="ms">
<h2 class="ms_h2">[field:title/]</h2>
<p>[field:body function='cn_substr(html2text(@me),600)'/]...</p>
</div>
</div>
{/dede:arclist}
CMSYOU - CMS企业网站定制专家
赞同来自:
在需要调用单页文档的地方加入SQL万用标签
{ dede :sql sql=select body from dede_sgpage where aid=2}[field:body /]{/dede:sql}
相信熟悉SQL语言的朋友很容易看懂这句含义。意思其实就是选择数据表dede_sgpage 的body字段输入,aid=2这里的2表示你创建单页文档ID数字,你使用时做下相应修改即可。
{dede:php}
$typeid = $refObj->Fields['typeid'];
$id = $refObj->Fields['id'];
{/dede:php}
{dede:sql sql='Select * from #@__archives where typeid = ~typeid~ AND id!=~id~ LIMIT 0,10'}
<li class="duo-ct"><a href="[field:id function=GetOneArchiveURL(@me)/]">[field:title/]</a></li>
{/dede:sql}
最新活动:2020-05-08 22:31
浏览:1605 次
关注:2 人
Copyright © 2008-2025 CMSYOU - 互助问答社区 - 粤ICP备10060801号-3 RSS Feed
欢迎加入QQ群(346494585) “让我们一起来学习CMS建站吧!”
要评论问题请先登录或注册