Skip to content
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

【bug】标签扩展bug #1106

Open
mkinit opened this issue Mar 12, 2022 · 0 comments
Open

【bug】标签扩展bug #1106

mkinit opened this issue Mar 12, 2022 · 0 comments

Comments

@mkinit
Copy link

mkinit commented Mar 12, 2022

'latest' => ['close' => 1], //最新内容列表
{Article:latest}
<li>{$post['title']}</li>
{/Article:latest}

上面这样定义的时候没有问题。

'latest' => ['attr' => 'limit', 'close' => 1], //最新内容列表
{Article:latest}
<li>{$post['title']}</li>
{/Article:latest}

当我加上参数之后,会报错:模板标签错误:latest
limit参数变成必填。

{Article:latest limit=""}
<li>{$post['title']}</li>
{/Article:latest}

加上limit属性才不会报错。
这样的话定义标签的时候根本不需要用attr声明参数了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant