We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
自定义分类模板中遍历读取评论列表时,只能获取到第1篇文章的评论
复现的步骤:
category 的目录下创建缩略名为文件名的 php 文件,然后遍历文章和评论,代码大致如下
<?php while ($this->next()): ?> <?php $this->content(); ?> <?php $this->comments()->listComments(); ?> <?php endwhile; ?>
结果发现,文章的遍历是对的,但是每个文章下的评论都是第1篇文章的评论。
文章A内容 --- 文章C的评论 文章B内容 --- 文章C的评论 文章C内容 --- 文章C的评论
遍历文章时,获取当前文章的评论列表。
可能是我的调用方法不对,但我没有找到相似的示例。
The text was updated successfully, but these errors were encountered:
在 index.php 中会出现这种情况么?
Sorry, something went wrong.
index 没有试,不过我把comments()方法复制了一个comments2(),把其中的 \Widget\Comments\Archive::alloc($parameter); 改为 \Widget\Comments\Archive::alloc($parameter, null, false); 调用comments2从而解决该问题。
\Widget\Comments\Archive::alloc($parameter);
\Widget\Comments\Archive::alloc($parameter, null, false);
另外,大佬你的joyqi.com的SSL到期了
joyqi.com
No branches or pull requests
描述这个 Bug
自定义分类模板中遍历读取评论列表时,只能获取到第1篇文章的评论
复现方式
复现的步骤:
category 的目录下创建缩略名为文件名的 php 文件,然后遍历文章和评论,代码大致如下
结果发现,文章的遍历是对的,但是每个文章下的评论都是第1篇文章的评论。
期望的结果
遍历文章时,获取当前文章的评论列表。
可能是我的调用方法不对,但我没有找到相似的示例。
平台
The text was updated successfully, but these errors were encountered: