2016-10-21 34 views
0

我的代碼如下我想顯示除我想要直接鏈接的所有類別之外的所有類別。 category_id_not似乎不起作用。顯示除表達引擎之外的所有類別

{exp:channel:categories category_group="4" style="linear" show_empty="yes" category_id_not="42"} 
<option value="/events/category/{category_url_title}">{category_name}</option> 
{/exp:channel:categories} 

回答

2
{exp:channel:categories category_group="4" style="linear" show_empty="yes" show="not 42"} 
    <option value="/events/category/{category_url_title}">{category_name}</option> 
{/exp:channel:categories} 

category_id_not是不是一個有效參數,也不是category_id(雖然這將是一致的和邏輯的),你應該使用show="not 42"代替。

完整文檔here

相關問題