我试图让expressionengine检查一个单词的通道字段,如果找到该单词,它将显示另一个字段的内容。ExpressioneEngine包含运算符不起作用
在这种情况下,我希望它为“志愿者”一词搜索{links-title},如果找到“Volunteer”这个词,它会显示{links-branch}的内容。
这里是我想要使用的代码:
{exp:channel:entries channel="locations-links"}
{if links-title *= "Volunteer"}
{links-branch}
{/if}
{/exp:channel:entries}
本页面:https://ellislab.com/expressionengine/user-guide/templates/conditionals.html#contains-operator说,包含运营商* =但是当我使用它时,页面显示完全空白。从字面上看,这个操作员似乎不起作用。如果我使用==它可行,但在这种情况下,{links-title}必须完全是“志愿者”,没有别的。
任何人都知道这是怎么回事?
在[EE 2.9]中添加了“contains”运算符(https://ellislab.com/expressionengine/user-guide/about/changelog.html#version-2-9-0) 。你正在运行什么版本? – AllInOne