首页 >

织梦DedeCMS任意页面调用栏目内容标签{dede:field.content/}的方法

本文实例讲述了DedeCMS任意页面调用栏目内容标签{dede:field.content/}的方法。分享给大伙供大伙参考。具体实现方法如下:

织梦DedeCMS任意页面调用栏目内容标签{dede:field.content/}的方法

{dede:field.content/} 这个标签系统只支持在栏目模板里调用,如果想要在任意页面调用这个内容可以使用下面的方法.

1 | 过滤掉所有的html代码,只显示文字,具体的ID自己更改.
代码如下:

{dede:sql sql='Select content from dede_arctype where id=1'}[field:content function='cn_substr(html2text(@me),800)'/]{/dede:sql}


2 | 不滤掉html代码,后台怎么编辑,首页就怎么显示,图片也可加载.
代码如下:

{dede:sql sql='Select content from dede_arctype where id=1'}[field:content/]{/dede:sql}


PS:意思是调用系统中的arctype这个表.

因为每个人安装DEDE的时候,表名的前辍不全都是用默认dede_,用这个标签不管系统的前辍是什么,都可以识别,是织梦的内置函数

希望本文所述对DedeCMS建站有所帮助。


织梦DedeCMS任意页面调用栏目内容标签{dede:field.content/}的方法
  • 织梦DedeCMS手机站自动生成首页index.html导致不更新解决办法
  • 织梦DedeCMS手机站自动生成首页index.html导致不更新解决办法 | 织梦DedeCMS手机站自动生成首页index.html导致不更新解决办法 ...

    织梦DedeCMS任意页面调用栏目内容标签{dede:field.content/}的方法
  • 织梦DedeCMS会员中心投稿编辑器修改
  • 织梦DedeCMS会员中心投稿编辑器修改 | 织梦DedeCMS会员中心投稿编辑器修改 ...

    织梦DedeCMS任意页面调用栏目内容标签{dede:field.content/}的方法
  • 织梦DedeCMS模板 listsize标签的作用
  • 织梦DedeCMS模板 listsize标签的作用 | 织梦DedeCMS模板 listsize标签的作用 ...