<legend id='s3wsf'><style id='s3wsf'><dir id='s3wsf'><q id='s3wsf'></q></dir></style></legend>
  • <i id='s3wsf'><tr id='s3wsf'><dt id='s3wsf'><q id='s3wsf'><span id='s3wsf'><b id='s3wsf'><form id='s3wsf'><ins id='s3wsf'></ins><ul id='s3wsf'></ul><sub id='s3wsf'></sub></form><legend id='s3wsf'></legend><bdo id='s3wsf'><pre id='s3wsf'><center id='s3wsf'></center></pre></bdo></b><th id='s3wsf'></th></span></q></dt></tr></i><div id='s3wsf'><tfoot id='s3wsf'></tfoot><dl id='s3wsf'><fieldset id='s3wsf'></fieldset></dl></div>

      <small id='s3wsf'></small><noframes id='s3wsf'>

        <tfoot id='s3wsf'></tfoot>
          <bdo id='s3wsf'></bdo><ul id='s3wsf'></ul>

      1. 织梦内容页使用if判断某个字段是否为空

        我们在使用织梦dedecms时候,如何使用if判断某个字段是否为空呢?我们以文章页自定义字段website为例:使用if语句判断website网址是否为空,如果有显示website并加上网址,如果没有就不显示。 {dede:field.website runphp='yes'}if(@me'') {@me = 'a href="'

            <legend id='8ipCJ'><style id='8ipCJ'><dir id='8ipCJ'><q id='8ipCJ'></q></dir></style></legend>
              <tbody id='8ipCJ'></tbody>

            <i id='8ipCJ'><tr id='8ipCJ'><dt id='8ipCJ'><q id='8ipCJ'><span id='8ipCJ'><b id='8ipCJ'><form id='8ipCJ'><ins id='8ipCJ'></ins><ul id='8ipCJ'></ul><sub id='8ipCJ'></sub></form><legend id='8ipCJ'></legend><bdo id='8ipCJ'><pre id='8ipCJ'><center id='8ipCJ'></center></pre></bdo></b><th id='8ipCJ'></th></span></q></dt></tr></i><div id='8ipCJ'><tfoot id='8ipCJ'></tfoot><dl id='8ipCJ'><fieldset id='8ipCJ'></fieldset></dl></div>
            <tfoot id='8ipCJ'></tfoot>

            <small id='8ipCJ'></small><noframes id='8ipCJ'>

            • <bdo id='8ipCJ'></bdo><ul id='8ipCJ'></ul>

                1. 我们在使用织梦dedecms时候,如何使用if判断某个字段是否为空呢?我们以文章页自定义字段website为例:使用if语句判断website网址是否为空,如果有显示website并加上网址,如果没有就不显示。

                  {dede:field.website runphp='yes'}if(@me<>'') {@me = '<a href="'.@me.'" target="_blank">'.@me.'</a>';} 
                              else {@me = '';}{/dede:field.website}
                  再比如调用某一栏目文章列表时,使用if判断是文章是否有简略标题,如果有就调用简略标题
                  {dede:arclist row='10'}
                      [field:array runphp='yes']
                          if (@me['shorttitle'] == '') {
                              @me = @me['title'];
                          } else {
                              @me = @me['shorttitle'];
                          }
                      [/field:array]
                  {/dede:arclist}
                   
                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  用到dedecms时候,有时候需要对文章列表、arclist输出时候的字段做判断显示,比如缩略图没有则不显示,有的时候就显示图片,并且固定尺寸,这个要怎么操作呢? 关于列表字段内自定义字段的调用方法,有数据则显示无数据则不显示(备注:limit=3,1意思是从第4
                  dedecms织梦怎么实现按照字母搜索,这个要怎么实现呢?下面我们来说一下该功能是如何实现的,主要的方法就是提取发布资源中第一个字母,存储到数据表中,然后进行索引。在进行本操作之前 要先备份数据库 首先 要添加数据库字段: ALTER TABLE `dede_archives`
                  我们在使用织梦dedecms的时候,发现{dede:datalist} 标签中用 [field:array runphp=yes] 或者 {dede:field name=array runphp=yes} 并不起作用,这个要怎么操作呢? 其实datalist中是不能用runphp标签的,但是可以用{dede:if} 这个标签,而且相对于runphp更好
                  dedecms织梦默认的TAG标签不是很灵活。有时候我们的标签需要进行一个分类,能不能像{dede:arclist}标签的自定义属性(如:flag=c,h),这样全站调用的时候更灵活。 全站调用TAG标签方法一般是: {dede:tag row='100' sort='new' getall='1'}a target="_blank
                  未审核文档的TAG会显示在TAG列表页面, 固然点击进入TAG时, 相关的未审核文章不会显示出来, 这样对用户体验是很不好的. DEDECMS暂时没有提供这个功能,所以要解决这个问题, 让DEDECMS不显示未审核文档的TAG, 就要修改TAG的显示库文件 tag.lib.php。 方法一 打
                  我们都知道DEDECMS生成的文件夹是按天生成的,只要传了图片就会自动建立个年月日的文件,centos系统下,都是随便排序的,很难找到对应文件夹,如果要按顺序排列,要怎么操作呢? 一、文件管理器: 修改 /dede/templets/file_manage_main.html $dh = dir($inp

                    <tbody id='fUVRZ'></tbody>
                  <tfoot id='fUVRZ'></tfoot>

                  • <bdo id='fUVRZ'></bdo><ul id='fUVRZ'></ul>

                      • <small id='fUVRZ'></small><noframes id='fUVRZ'>

                          <legend id='fUVRZ'><style id='fUVRZ'><dir id='fUVRZ'><q id='fUVRZ'></q></dir></style></legend>

                          • <i id='fUVRZ'><tr id='fUVRZ'><dt id='fUVRZ'><q id='fUVRZ'><span id='fUVRZ'><b id='fUVRZ'><form id='fUVRZ'><ins id='fUVRZ'></ins><ul id='fUVRZ'></ul><sub id='fUVRZ'></sub></form><legend id='fUVRZ'></legend><bdo id='fUVRZ'><pre id='fUVRZ'><center id='fUVRZ'></center></pre></bdo></b><th id='fUVRZ'></th></span></q></dt></tr></i><div id='fUVRZ'><tfoot id='fUVRZ'></tfoot><dl id='fUVRZ'><fieldset id='fUVRZ'></fieldset></dl></div>