diff --git a/public/themes/website/1/zh/demo/news.html b/public/themes/website/1/zh/demo/news.html index ab7700c..f42f8e1 100644 --- a/public/themes/website/1/zh/demo/news.html +++ b/public/themes/website/1/zh/demo/news.html @@ -90,19 +90,28 @@ + {hcTaglib:contentPage2 cid="$current_cate_id" mainField="id,category_id,title,sub_title,thumbnail,content,description,create_time" subField="" name="hc_featured" limit="100" item="content_sub22" sort="sort asc" isTop="1"} + {/hcTaglib:contentPage2} + {php} + $news_has_featured = false; + if (!empty($hc_featured)) { + if (is_object($hc_featured) && method_exists($hc_featured, 'isEmpty')) { + $news_has_featured = !$hc_featured->isEmpty(); + } elseif (is_countable($hc_featured)) { + $news_has_featured = count($hc_featured) > 0; + } + } + {/php} + {if $news_has_featured} + {/if}