🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
\[基础用法\] 名称:screening 功能:筛选文章 语法: {eyou:screening id='field' currentstyle='active' alltxt='不限' }                                     {eyou:volist name='$field.list' id='vo'}                                                                                {$vo.title}:                                                                                        {eyou:volist name='$vo.dfvalue' id='val'}                             {$val.name}                          {/eyou:volist}                                                                     {/eyou:volist}                                     清除筛选条件                         {$field.hidden}     {/eyou:screening} 参数: id='' 可以任意指定循环里的变量名替代field,假设id='field1',模板调用如:{$field.title} 变成 {$field1.title} typeid='' 专用于首页筛选,首页调用标签一定要指定栏目ID currentstyle='' 应用样式class类名 addfields='' 自定义字段名,多个字段之间用英文逗号隔开,比如:addfields='price,spce' alltxt='' 筛选数值中的第一个自定义选项,该选项是用于重置单条筛选条件,alltxt='off' 表示不显示,其他文案显示比如:alltxt='全部',alltxt='不限',alltxt='所有' empty='' 没有数据时显示的文案 底层字段: 请查阅易优Cms官方提供的数据字典,找到表名 ey\_channelfield  、ey\_article\_content \-------------------------------效果展示-------------------------------- 1,调用指定栏目文章 模板调用标准代码 {eyou:screening id='field' currentstyle='active' alltxt='全部'}                         {eyou:volist name='$field.list' id='vo'}                                                            {$vo.title}:                                                                  {eyou:volist name='$vo.dfvalue' id='val'}                             {$val.name}                          {/eyou:volist}                                                 {/eyou:volist}             清除筛选条件                 {$field.hidden}     {/eyou:screening} 网站前端显示效果(css样式请自行填充) 【更多示例】 \-------------------------------示例1-------------------------------- 描述:指定自定义字段读取筛选条件 {eyou:screening id='field' currentstyle='active' addfields='danxuan' alltxt='不限'}                         {eyou:volist name='$field.list' id='vo'}                                                             {$vo.title} :                                                                  {eyou:volist name='$vo.dfvalue' id='val'}                             {$val.name}                          {/eyou:volist}                                                 {/eyou:volist}             清除筛选条件                 {$field.hidden}     {/eyou:screening}   \-------------------------------示例2-------------------------------- 描述:关闭 “不限” 筛选按钮 {eyou:screening id='field' currentstyle='active' alltxt='off'}                         {eyou:volist name='$field.list' id='vo'}                                                             {$vo.title} :                                                                  {eyou:volist name='$vo.dfvalue' id='val'}                             {$val.name}                          {/eyou:volist}                                                 {/eyou:volist}             清除筛选条件                 {$field.hidden}     {/eyou:screening}