{dede:field name='array' runphp='yes'} if (@me['shorttitle']=='') @me=@me['title'];else @me=@me['shorttitle'];{/dede:field} |
[field:array runphp='yes'] if (@me['shorttitle']=='') @me=@me['title'];else @me=@me['shorttitle'];[/field:array] |
<ul> {dede:arclist titlelen='50' row='10'} <li><a title="[field:title /]" href="[field:filename /]">[field:title function='( strlen("@me")>30 ? cn_substr("@me",30)."..." : "@me" )'/]</a></li> {/dede:arclist} </ul> |
{dede:list pagesize='15' orderby='weight' orderway='desc'} <dl> <dt>[field:pubdate function='strftime("%Y/%m/%d",@me)'/]</dt> <dd> [field:array runphp='yes'] if (@me['body']=='') @me=@me['title'];else{ @me = '<a href="'.@me['arcurl'].'" title="'.@me['description'].'" target="_blank">'.@me['title'].'</a>';}[/field:array] </dd> </dl> {/dede:list} |