我試圖根據發佈的條目是否處於打開狀態或關閉狀態來打開和關閉一段導航。表達式引擎有條件基於頁面的狀態
所以我的目的是一樣的東西:
{if particluarpage == "closed"}
content
{if:elseif}
content
{/if}
感謝
我試圖根據發佈的條目是否處於打開狀態或關閉狀態來打開和關閉一段導航。表達式引擎有條件基於頁面的狀態
所以我的目的是一樣的東西:
{if particluarpage == "closed"}
content
{if:elseif}
content
{/if}
感謝
有幾種實現方法。最簡單的選擇可能是通過query module發出查詢。
{exp:query sql="SELECT status FROM exp_channel_titles WHERE entry_id = '4'"}
{if status == 'open'}
Show Block A
{if:else}
Show Block B
{/if}
{/exp:query}
感謝的人,實際的工作完美!再次感謝! – prosborne
難道不應該是這樣的?
{if "{exp:channel:entries channel="yourchannel" entry_id="X"}{status}{/exp:channel:entries}" == "closed"}
content
{if:else}
content
{/if}
也許你還需要dynamic =「no」參數。
FYI ...有一個EE StackExchange網站現在EE的問題,如果你想使用它:http://stackexchange.com/leagues/221/week/expressionengine –