织梦使用if判断某个字段是否为空

织梦如何使用if判断某个字段是否为空呢?我们以文章页调用文章摘要为例:

使用if语句判断摘要是否为空,如果有摘要就显示摘要模块,如果没有就不显示

{dede:field.description runphp='yes'} 
if (@me <> '') {
  @me = '<div>'.@me.'</div>'; } else {   @me = '';
} {/dede:field.
description}

再比如调用某一栏目文章列表时,使用if判断是文章是否有简略标题,如果有就调用简略标题

{dede:arclist row='10'}
    [field:array runphp='yes']
        if (@me['shorttitle'] == '') {
            @me = @me['title'];
        } else {
            @me = @me['shorttitle'];
        }
    [/field:array]
{/dede:arclist}