关于DEDE文章调用与标题相关的全站文章
你需要的标签:<title>{dede:fieldtitle/}_{dede:globalcfg_webname/}</title>
<meta name="keywords" content="{dede:fieldkeywords/}" />
<meta name="description" content="{dede:fielddescription function='html2text(@me)'/}" />
另附:
DEDE全站通用标签:
根网址:
{dede:globalcfg_cmsurl/}/style/
标签里面的根网址:
[field:globalcfg_cmsurl/]
网站域名:
{dede:globalcfg_basehost/}
模板路径:
{dede:globalcfg_templets_skin/}
标题:
<title>{dede:globalcfg_webname/} </title>
<meta name="description" content="{dede:globalcfg_description/}" />
<meta name="keywords" content="{dede:globalcfg_keywords/}" />
频道页标题、关键字:
<title>{dede:fieldtitle/}_{dede:globalcfg_webname/}</title>
<meta name="keywords" content="{dede:field name='keywords'/}" />
<meta name="description" content="{dede:field name='description' function='html2text(@me)'/}" />
摘要:
[field:description function='cn_substr(@me,110)'/]
日期:
[field:pubdate function=MyDate('m-d',@me)/]
[field:pubdate function=MyDate('20y-m-d',@me)/]
点击:[field:click/]
调用其他模板文件
{dede:include filename="headhtm"/}
当前位置:
{dede:field name='position'/}
seo标题
{dede:fieldseotitle /}
文章ID:
[field:id/]
排序:
{dede:arclist row=5 orderby=pubdate titlelen=18}
[field:autoindex runphp='yes']@me=$GLOBALS['autoindex']-1;[/field:autoindex]
{/dede:arclist}
文章标题:
[field:title/]
文章链接地址:
[field:arcurl/]
简略标题:
[field:shorttitle/]
文章列表:
{dede:arclist typeid='' row='1' titlelen='24' orderby='pubdate'}
<a href="[field:arcurl/]" title="[field:title/]" target="_blank">[field:title/]</a>
<li><a href="[field:arcurl/]">[field:title/]</a></li>
{/dede:arclist}
文章显示:
<li><a href="[field:arcurl/]" title="[field:title/]" target="_blank">[field:title/]</a></li>
<a href="[field:arcurl/]" title="[field:title/]">[field:title/]</a>
调用:
{dede:arclist row='1' typeid='' titlelen='24' orderby='pubdate' type='image'}
[field:picname/]
{/dede:arclist}
{dede:fieldlitpic/}
商品文章页:
dede调用标签:
<img src={dede:fieldlitpic/}>
{dede:fieldlitpic/}
[field:imglink/]=<a href='[field:arcurl/]'><img src='[field:picname/]' border='0' width='imgwidth' height='imgheight'></a>
DEDE-列表/栏目页标签:
栏目内容:
{dede:fieldcontent/}
调用分类信息:
{dede:arclist row=5 orderby=pubdate typeid='37' imgwidth='124' imgheight='96'}
{dede:arclistsg orderby=’id’ titlelen=’24′ row=’10′ channelid=’-8′ typeid=’1,2′}
{/dede:arclistsg}
栏目列表页list标签:
{dede:list pagesize='10'}
<li>
<a href="[field:arcurl/]" class="title">[field:title/]</a> <span class="info">
<p class="intro">
[field:description/]
</p>
</li>
{/dede:list}
列表分页/页码:
{dede:pagelist listitem="info,index,end,pre,next,pageno,option" listsize="5"/}
主目录:
<ul>
<li><a href='{dede:globalcfg_cmsurl/}/'><span>主页</span></a></li>
{dede:channel type='top' row='10' currentstyle="<li class='hover'><a href='~typelink~' ~rel~><span>~typename~</span></a></li>"}
<li><a href='[field:typeurl/]' [field:rel/]><span>[field:typename/]</span></a></li>
{/dede:channel}
</ul>
<li><a href='{dede:globalcfg_cmsurl/}/'><span>主页</span></a></li>
{dede:channel type='top' row='10'}
<li><a href='[field:typeurl/]'><span>[field:typename/]</span></a></li><li class="line"></li>
{/dede:channel}
栏目,目录调用
<ul>
<li><a href='{dede:globalcfg_cmsurl/}/'><span>主页</span></a></li>
{dede:channel type='top' row='10' currentstyle="<li class='hover'><a href='~typelink~' ~rel~><span>~typename~</span></a></li>"}
<li><a href='[field:typeurl/]' [field:rel/]><span>[field:typename/]</span></a></li>
{/dede:channel}
</ul>
<UL>
{dede:channel typeid=39 type='son' noself='yes'}
<LI><a href="[field:typeurl/]">[field:typename/]</a></LI>
{/dede:channel}
</UL>
[field:typelink/]
带标题的二级目录链接
<a href="[field:typeurl/]" title='[field:typename/]'>[field:typename/]</a>
{dede:ask row='6' qtype='new' tid='0' titlelen='24'}
<dd>
<span class="tclass">[<a href='[field:typeurl/]'>[field:tidname/]</a>]</span>
<span class="tlink"><a href="[field:url/]">[field:title/]</a></span>
</dd>
{/dede:ask}
频道头条:
{dede:arclist flag='h' limit='0,1'}
问答模块标签
{dede:ask row='3' qtype='ok' tid='0' titlelen='26'}
<li>
[<a href='[field:typeurl/]'>[field:tidname/]</a>]
<a href="[field:url/]">[field:title/]</a>
</li>
{/dede:ask}
DEDE-文章页标签:
<title>{dede:fieldtitle/}_{dede:globalcfg_webname/}</title>
<meta name="keywords" content="{dede:fieldkeywords/}" />
<meta name="description" content="{dede:fielddescription function='html2text(@me)'/}" />
文章正文标题
{dede:fieldtitle/}
时间:
{dede:fieldpubdate function="MyDate('Y-m-d H:i',@me)"/}
来源:
{dede:fieldsource/}
作者:
{dede:fieldwriter/}
点击:
<script src="{dede:field name='phpurl'/}/countphpview=yes&aid={dede:field name='id'/}&mid={dede:fieldname='mid'/}" type='text/javascript' language="javascript"></script>
摘要:
{dede:fielddescription runphp='yes'}
if(@me<>'' )@me = '<div class="intro">'@me'</div>';
{/dede:fielddescription}
文章正文内容:
{dede:fieldbody/}
{dede:field name='title'/}
文章商品:
{dede:fieldlitpic/}
{dede:fieldlitpic/}
商品内页:
<small>商品原价:</small><span>{dede:fieldprice/}元</span>
<small>优惠价格:</small><span class="fc-f60">{dede:fieldtrueprice/}元</span>
<small>品牌:</small><span>{dede:fieldbrand/}</span>
<small>单位:</small><span>{dede:fieldunits/}</span>
<small>上架日期:</small><span>{dede:fieldpubdate function="MyDate('y-m-d H:i',@me)"/}</span>
<small>人气:</small><span><script src="{dede:field name='phpurl'/}/countphpview=yes&aid={dede:field name='id'/}&mid={dede:field name='mid'/}" type='text/javascript' language="javascript"></script></span>
<form id="formcar" name="formcar" method="post" action="{dede:field name='phpurl'/}/posttocarphp">
<input type="hidden" name="id" value="{dede:fieldid/}" />
<input type="hidden" name="title" value="{dede:fieldtitle/}" />
<input type="hidden" name="price" value="{dede:fieldtrueprice/}" />
<input type="hidden" name="units" value="{dede:fieldunits/}" />
<small>购物车:</small><span><a href="{dede:field name='phpurl'/}/carphp" target="_blank">查看购物车</a></span>
<small>购买:</small><span><button type="submit" name="button" class="btn-2">放入购物车</button></span>
DEDE-频道页标记:
{dede:channelartlist}
<dl class="tbox">
<dt><strong><a href="{dede:field name='typeurl'/}">{dede:field name='typename'/}</a></strong><span class="more"><a href="{dede:field name='typeurl'/}">更多</a></span></dt>
<dd>
<ul class="d1 ico3">
{dede:arclist titlelen='60' row='8'}
<li><span class="date">[field:pubdate function="MyDate('m-d',@me)"/]</span><a href="[field:arcurl /]">[field:title /]</a></li>
{/dede:arclist}
</ul>
</dd>
</dl>
{/dede:channelartlist}
上一篇下一篇
{dede:prenext get='pre'/}
{dede:prenext get='next'/}
新增字段:
{dede:arclist typeid='45' row='8' imgwidth='105' imgheight='105' titlelen='16' addfields='trueprice,price' channelid='6' }
市场价¥[field:price /]
优惠价¥[field:trueprice /]
{/dede:arclist}
DEDE-其他标签:
备案:
{dede:globalcfg_beian/}
版权:
{dede:globalcfg_powerby/}
友情链接:自带li标记
{dede:flink row='24'/}
去掉li标签:
{dede:flink linktype='2' row='24'}[field:link /]{/dede:flink}
{dede:flink linktype='2' row='24' typeid="1"}[field:link /]|{/dede:flink}
A标签的友情链接:
{dede:flink type='textall' row='10'}
<a href="[field:url/]" target=_blank class="font-size3 color4">[field:webname/]</a>
{/dede:flink}
SQL代码
直接从数据库调用友情链接{dede:sql sql="Select From dede_flink where logo = '' order by id desc"}<a target="_blank" href="[field:url/]" title="[field:webname/]">[field:webname/]</a>{/dede:sql}
dede标签调用:
{dede:tag row='10' getall='1' sort='month'}
<li><a href='[field:link/]'>[field:tag /]</a></li>
{/dede:tag}
栏目链接标签:
<a href="{dede:type typeid='0' row=1}[field:typelink /]{/dede:type}">查看本类全部内容</a>
指定调用栏目标签: {dede:onetype typeid='ID'}[field:typename /]{/dede:onetype}
频道栏目调用标签:
{dede:channel type='self' typeid='7'}<li><a href='[field:typelink/]'>[field:typename/]</a></li>
{/dede:channel}
{dede:channel type='self' typeid='7' row='1'}<a href='[field:typelink/]'>[field:typename/]</a>{/dede:channel}
调用一个栏目:
{dede:type typeid='8'}
<a href="[field:typelink /]">[field:typename /]</a>
{/dede:type}
限制行数标签:
{dede:arclist typeid='' row='2' limit='0,1' titlelen='24' orderby='pubdate'}
去掉标题的幻灯片代码:
<!-----幻灯片------->
<script language='javascript'>
linkarr = new Array();
picarr = new Array();
textarr = new Array();
var swf_width=546;
var swf_height=126;
//文字颜色|文字位置|文字背景颜色|文字背景透明度|按键文字颜色|按键默认颜色|按键当前颜色|自动播放时间|过渡效果|是否显示按钮|打开方式
var configtg='0xffffff||0x3FA61F|5|0xffffff|0xC5DDBC|0x000033|4|3|1|_blank';
var files = "";
var links = "";
var texts = "";
//这里设置调用标记
{dede:arclist flag='f' row='5'}
linkarr[[field:globalautoindex/]] = "[field:arcurl/]";
picarr[[field:globalautoindex/]] = "[field:litpic/]";
{/dede:arclist}
for(i=1;i<picarrlength;i++){
if(files=="") files = picarr[i];
else files += "|"+picarr[i];
}
for(i=1;i<linkarrlength;i++){
if(links=="") links = linkarr[i];
else links += "|"+linkarr[i];
}
documentwrite('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownloadmacromediacom/pub/shockwave/cabs/flash/swflashcab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
documentwrite('<param name="movie" value="{dede:globalcfg_cmsurl/}/style/images/bcastr3swf"><param name="quality" value="high">');
documentwrite('<param name="menu" value="false"><param name=wmode value="opaque">');
documentwrite('<param name="FlashVars" value="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'&bcastr_config='+configtg+'">');
documentwrite('<embed src="{dede:globalcfg_cmsurl/}/style/images/bcastr3swf" wmode="opaque" FlashVars="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_config='+configtg+'&menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://wwwmacromediacom/go/getflashplayer" />'); documentwrite('</object>');
</script>
<!-----幻灯片------->
文章原文地址:
<a href="{dede:globalcfg_basehost/}{dede:field name='arcurl'/}">{dede:globalcfg_basehost/}{dede:field name='arcurl'/}</a>
注:以上内容由Braineo总结编辑并提供。
方法:typeid='top' 或者typeid='asdas'任意字母不为空不为数字 写上这一个属性就可以了
{dede:arclist orderby='pubdate' titlelen='28' row='7' typeid='top' }
如果是在文章页 这篇文章又是最新刚发布的,那么最新文章里就会包含这篇文章,想要去除这篇文章,可以加limit{dede:arclistorderby='pubdate' titlelen='28'row='7'typeid='top' limit='1,7'}
当然如果不是最新的文章,再次生成的时候还是有可能和当篇文章重复的
织梦内容管理系统(DedeCms) 以简单、实用、开源而闻名,是国内最知名的PHP开源网站管理系统,也是使用用户最多的PHP类CMS系统,在经历多年的发展。
目前的版本无论在功能,还是在易用性方面,都有了长足的发展和进步,DedeCms免费版的主要目标用户锁定在个人站长,功能更专注于个人网站或中小型门户的构建,当然也不乏有企业用户和学校等在使用该系统。
使用dedecms系统制作我的个人博客的过程中,为了让搜索引擎把新加的文章尽快的收录,我在每一个详细内容里都调用了全部的最新文章,具体方法如下:
{dede:arclist row=’条数’ typeid=’all’ orderby=’pubdate’}
<li><a
href="[field:arcurl/]">[field:title/]</a></li>
{/dede:arclist}
如果你要调用全站的推荐文章,方法如下
{dede:arclist row=’条数’
typeid=’all’ flag='c' orderby=’pubdate’}
<li><a
href="[field:arcurl/]">[field:title/]</a></li>
{/dede:arclist}
文章数量: {dede:php}$uname = $refObj->Fields['writer'];$row = $dsql->GetOne("select count(id) from dede_archives where writer='$uname'");echo $row['count(id)'];{/dede:php}
实现效果如:
0条评论