expressionengine related entries dropdown value
I have 2 channels. Channel 2 has a dropdown select box relating to channel 1. I want to display all info regarding both channels on a single page:
{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}
I'm getting ID from {tag_from_channel1} instead of value. How can I display value instead of ID?
Try removing the require_entry="yes"
parameter, which aide in your troubleshooting:
{exp:channel:entries channel="channel1|channel2" limit="1"}
{title}
{reverse_related_entries}
{title}
{/reverse_related_entries}
{/exp:channel:entries}
You can further debug your issue by eliminating the URL causing a problem by hard-coding your Channel Entries query with dynamic="off"
and specifying a single entry with entry_id="99"
:
{exp:channel:entries ... dynamic="off" entry_id="99"}
Also, the {reverse_related_entries}
tag shouldn't have an id=
parameter. From the ExpressionEngine Relationship Documentation:
Unlike the Related Entries tag, the Reverse Related Entries tag does not contain an ID parameter as there is no need.
Did you perhaps intend to use {related entries}
instead?
上一篇: 表达式引擎限制分页和反向相关条目
下一篇: 与表达式引擎相关的条目下拉值