我需要一些循環表達式引擎條目的幫助。我在一個我一直在努力的網站上遇到了一堵磚牆。基本上該網站有6個最新的項目在底部,左側和右側有next和prev圖標。當你到達項目的結尾時,會回到項目的開始按鈕,將用戶帶回到項目的開始......呃,客戶端不再需要這些,只是希望項目有一個無限循環!循環表達式引擎條目?
這是可能與EE,是否有一個循環條目我可以使用的附加組件?
我的代碼是:
{exp:channel:next_entry category_group="1" category="{categories}{category_id}|{/categories}"}
<a class="rightNav" href="{id_path='projects-test/view'}" style="color:#000;"><<</a>
{/exp:channel:next_entry}
{embed="projects-test/related" stop_before="{entry_date format="%Y-%m-%d %H:%i"}" category_id="{categories show_group="1" limit="1"}{category_id}{/categories}"}
{exp:channel:prev_entry category_group="1" category="{categories}{category_id}|{/categories}"}
<a class="leftNav" href="{id_path='projects-test/view'}" style="color:#000;">>></a>
{/exp:channel:prev_entry}
{/exp:channel:entries}
相關模板代碼:
{exp:channel:entries channel="project" limit="6" category_group="1" stop_before="{embed:stop_before}" related_categories_mode="yes" custom_fields="yes"}
{if count == "1"}<ul id="filmStrip">{/if}
<li>
{exp:imgsizer:size src="{project_image}" height="68px" width="137px"}
<a href="{title_permalink='projects-test/view'}"><img src="{sized}" height="{height}" width="{width}" alt=""/></a>
{/exp:imgsizer:size}
<a href="{title_permalink='projects-test/view'}"><p class="thumbTitle">{title}</p></a>
</li>
{if count == total_results}</ul>{/if}
{/exp:channel:entries}
表達式引擎並不經常出現在這裏,所以反應將是有限的。試試http://expressionengine.com/forums/ – adlawson
不管你信不信,過去我在這裏比我的論壇有更多的幫助。他們的社區不是很有幫助。 –
與EE一樣靈活和強大的系統的缺點之一是,聽起來像「循環條目」一樣簡單的事情實際上是非常棘手的,因爲沒有任何順序或限制任何條目列表。任何結果的順序和長度可以變化很大。 –