-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
标签扩展如何传递变量参数? #1104
Comments
邮箱已收到,谢谢你的支持,祝你生活愉快~~=================================杨怀桂手机:13698971401
|
我看了一下你的标签扩展跟官方差不多的写法,是返回一段PHP代码,我之前试过是可以直接传递变量的。 |
你这个标签库是直接生成最终html ? html中没有php代码 ? 除非是模板阶段就需要固定结果的,一般是把参数解析成php代码(就是编译后的模板代码),然后在实际访问的时候执行代码输出结果 。 |
是的,我的标签库输出的就是最终的html。我再研究研究,实在不行我就从url提取当前文章ID就行了。谢谢大佬。 |
{Js2:postlist cate="$post['category']['id']" /}
做了一个自定义标签,想把当前文章的分类id传过去,发现传过去是$post['category']['id']原样的字符串,不是分类ID。有没有大佬用过自定义标签,求解
The text was updated successfully, but these errors were encountered: