2012-01-09 49 views
0

我有2個通道。通道2擁有與通道1。我想就顯示在一個頁面上兩個通道的所有信息下拉選擇框:表達式引擎相關條目下拉值

{exp:channel:entries channel="channel1|channel2" require_entry="yes" limit="1"} 
{title} 
Channel1 info: {tag_from_channel1} 
...        
{reverse_related_entries id="channel2"} 
... 
{/reverse_related_entries} 
{/exp:channel:entries} 

我從價值{} tag_from_channel1而不是讓ID。我如何顯示值而不是ID?

回答

0

嘗試取出require_entry="yes"參數,助手在您的故障排除:

{exp:channel:entries channel="channel1|channel2" limit="1"} 
    {title} 

    {reverse_related_entries} 
     {title} 
    {/reverse_related_entries} 
{/exp:channel:entries} 

您可以通過消除在URL中使用硬編碼的通道條目的查詢與dynamic="off"並指定一個導致問題進一步調試您的問題進入與entry_id="99"

{exp:channel:entries ... dynamic="off" entry_id="99"} 

此外,{reverse_related_entries}標籤不應該有一個id=參數。從ExpressionEngine Relationship Documentation

不同的是相關詞條標籤時,反向相關詞條標籤不 不是沒有必要包含ID參數。

您是否打算使用{related entries}來代替?