织梦 获取URL路径添加到meta标签中

第一步:“删除站根网站” 里面的信息,原因文章页会把该域名添加上。

 

第二步:添加对应的代码

<!--首页添加的代码-->
<meta name="mobile-agent" content="format=[wml|xhtml|html5]; url=m.xxx.com"/>


<!--列表页添加的代码-->
<meta name="mobile-agent" content="format=[wml|xhtml|html5]; url=m.xxx.com{dede:type row=1}[field:typelink /]{/dede:type}"/>

<!--内容页添加的代码-->
<meta name="mobile-agent" content="format=[wml|xhtml|html5]; url=m.xxx.com{dede:field.id runphp='yes'}$id=@me;@me='';$url=GetOneArchive($id);@me=$url['arcurl'];{/dede:field.id}"/>

效果图:

 

猜你喜欢

转载自onestopweb.iteye.com/blog/2300901