表达式引擎相关条目下拉值
我有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?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试删除
require_entry="yes"
参数,这有助于排除故障:您可以通过使用
dynamic= 对频道条目查询进行硬编码来消除导致问题的 URL,从而进一步调试您的问题“off”
并使用entry_id="99"
指定单个条目:此外,
{reverse_lated_entries}
标记不应具有id=
参数。来自 ExpressionEngine 关系文档:您是否打算改用
{相关条目}
?Try removing the
require_entry="yes"
parameter, which aide in your troubleshooting: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 withentry_id="99"
:Also, the
{reverse_related_entries}
tag shouldn't have anid=
parameter. From the ExpressionEngine Relationship Documentation:Did you perhaps intend to use
{related entries}
instead?