更改 ExpressionEngine 插件的解析顺序
我在模板中有以下 ExpressionEngine 代码:
{exp:hits:count_hits_image entry_id='{exp:test:getpage tag="id"}'}
其中 exp:test
是我创建的一个插件,用于获取 频道条目 ID。
我遇到的问题是 exp:hits
是在 exp:test
之前解析的,这使得整个标签无法正常工作。
我该怎么做才能告诉 ExpressionEngine 在解析外部标记 {exp:hits}
之前先解析内部标记 {exp:test}
?
I have the following ExpressionEngine code in a template:
{exp:hits:count_hits_image entry_id='{exp:test:getpage tag="id"}'}
Where exp:test
is a plugin I created to get a channel entry's ID.
The problem I'm having is that exp:hits
is being parsed before exp:test
, which makes the whole tag disfunctional.
What can I do to tell ExpressionEngine to parse the inside tag first {exp:test}
, before parsing the outside tag {exp:hits}
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你需要做的是将你的插件变成一个标签对,所以它的工作原理如下:
在你的插件中你会做这样的事情:
What you need to do is turn your plugin into a tag pair, so it works like this:
In your plugin you'd do something like this:
试试这个:
Try this: