0

我正在使用硬编码导航在 Expression Engine 中构建一个站点。我需要隐藏其中一个导航项目,直到客户在某个类别下进行条目,这就是我现在所拥有的:

{exp:channel:entries category_name="name" limit="1"}
  {if count > 0}
    <li> &bull; <a href="#">Link</a></li>
  {if:else}
    (don't show anything)
  {/if}
{/exp:channel:entries}

有什么想法吗?谢谢!

4

1 回答 1

0

yeah, exactly. If there is nothing there, it just won't show anything. If you needed to add a placeholder or something, you could use the {if no_results} tag.

于 2013-08-20T17:27:02.360 回答