# 如何在以下 if 语句中针对特定主题/类别/标签

**URL:** <https://meta.discourse.org/t/how-to-target-a-specific-topic-category-tag-in-the-following-if-statement/131852>\
**Category:** Development\
**Created:** [2019年十月25日 08:25 UTC](https://meta.discourse.org/t/how-to-target-a-specific-topic-category-tag-in-the-following-if-statement/131852 "2019-10-25T08:25:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flyingdojo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/flyingdojo/32/157723_2.png) [@flyingdojo](https://meta.discourse.org/u/flyingdojo)\
**Post date:** [2019年十月25日 08:25 UTC](https://meta.discourse.org/t/how-to-target-a-specific-topic-category-tag-in-the-following-if-statement/131852/1 "2019-10-25T08:25:19Z")

</div>

在以下 if 语句中，我能否针对特定的主题/分类/标签进行筛选：

`if (Discourse.User.currentProp("topic_count") > 0)`

如果可以，我很乐意听到您的建议！
