在 Drupal 6 视图 2 中显示单个节点和所有关联的注释

发布于 2024-09-07 07:19:54 字数 169 浏览 3 评论 0原文

我正在尝试在 Drupal 6(视图 2)上创建一个视图,该视图仅显示特定类型的最新节点以及该节点的所有关联注释。

我确信有一种简单的方法可以做到这一点,但我只是不知道。

从算法上讲,我将通过确定该类型的最新节点然后递归其所有子节点来解决这个问题。但我显然不能这样做。

谢谢。

I am trying to create a view on Drupal 6 (views 2) that simply displays the latest node of a specific type and all of the associated comments from that node.

I am sure that there is a simple method to do this that I just don't know.

Algorithmically, I would solve it by ascertaining the latest node of the type and then recursing through all its children. But I can't apparently do that.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如梦 2024-09-14 07:19:54

好消息!这并不难。 :)

创建一个将用作首页的视图。让它抓取并显示您想要的单个节点及其注释。然后,在过滤器下,选择节点:发布日期并执行大于 -1 且小于 +1 天的操作。

这是一个例子:

Basic settings
Name: Defaults
Title: None
Style: Unformatted
Row style: Fields
Use AJAX: No
Use pager: No
Items to display: 1
More link: No
Distinct: No
Access: Unrestricted
Caching: None
Exposed form in block: No
Header: None
Footer: None
Empty text: None
CSS class: None
Theme: Information

--

Relationships
None defined

--

Arguments
None defined

--

Fields
Node: Title Title
Node: Post date Post date
Node: Body
Node: Last comment time Last comment time
Node: Add comment link Add comment
Node: Comment count Comment count
Comment: Title
Comment: Author Author
Comment: Body

--
Sort criteria
None defined

--

Filters
Node: Post date > -1 day
Node: Post date

Good news! This is not so hard. :)

Create a view that you will use as your front page. Have it grab and display the single node that you want along with it's comments. Then, under filter, pick node: Post Date and do greater than -1 and less than +1 days.

Here's an example:

Basic settings
Name: Defaults
Title: None
Style: Unformatted
Row style: Fields
Use AJAX: No
Use pager: No
Items to display: 1
More link: No
Distinct: No
Access: Unrestricted
Caching: None
Exposed form in block: No
Header: None
Footer: None
Empty text: None
CSS class: None
Theme: Information

--

Relationships
None defined

--

Arguments
None defined

--

Fields
Node: Title Title
Node: Post date Post date
Node: Body
Node: Last comment time Last comment time
Node: Add comment link Add comment
Node: Comment count Comment count
Comment: Title
Comment: Author Author
Comment: Body

--
Sort criteria
None defined

--

Filters
Node: Post date > -1 day
Node: Post date

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文