{include file='ebcms@common/header' /} {php} $default_attr = \ebcms\Config::get('content.attr'); $where = []; if(input('attr')){ $where = [ 'attr' => input('attr'), ]; } $data = \app\content\model\Attr::with('content') -> where($where) -> order('sort desc,content_id desc') -> select(); {/php}

### 属性管理

{php} $attrs = \think\Db::name('content_attr') -> group('attr') -> column('attr'); {/php} {foreach name='attrs' item='vo'} {$vo} {/foreach}

{if condition="input('attr')"}

选择 | 排序 | 标题 | 状态 | 浏览量 | 创建时间
--- | --- | --- | --- | --- | ---
{foreach name='data' item='vo'} {php} $content = $vo['content']; {/php}
{$vo.content_id} |  | {neq name='content.thumb' value=''} {/neq} {$content.title} | {switch name='content.status'} {case value='99'} {/case} {case value='1'} {/case} {default/} {/switch} | {$content.click} | {$content.create_time|date='Y-m-d H:i:s',###}
{/foreach}
选择 | 建议定期将过久的内容从属性中移除出去以提升前台性能！

{else/}

请选择属性以管理数据！

建议定期将过久的内容从属性中移除出去以提升前台性能！

{/if}
{include file='ebcms@common/footer' /}