Drupal 中可以实现类似行为的内容过滤器吗?

发布于 2025-01-03 04:41:31 字数 578 浏览 3 评论 0原文

这里问了同样的问题,但没有得到答案,所以我在这里尝试:)

嘿,

我正在开发一个类似于 Behance 的网站。

为了让你明白我在说什么,我会解释一下;

我有一个名为...“内容”的内容类型,它可以分为三个不同的类别:“类别 1”、“类别 2”和“类别 3”。

然后,我得到了一个名为“内容过滤器”的页面,在其中我可以看到不同类别中的所有内容。

在此页面上,我可以通过选择类别和时间(自上传内容以来的时间)来过滤应显示的内容。

因此,如果我选择类别 1 和 1 个月或类似的内容,它会将页面上的内容过滤为我选择的内容,而无需上传页面。所以我会把它称为“实时内容过滤器”,我希望你明白这一点。

无论如何, 我知道如何实现这一切,但是如果不转到另一个页面,它就不会进行过滤,而且我必须创建太多的视图。

希望有人能帮助我解决这个问题,那就太好了。

Asked the same question here but got no answer, so I'm trying here instead :)

Hey,

I'm working on a site somewhat similar to Behance.

To make you understand what I'm talking about, I'll explain a little bit;

I got a content type called say... "Content", which can go into three different categories, "Category 1", "Category 2" and "Category 3".

Then, I got a page called "Content filter" where I can see all the content in the different categories.

On this page I'm able to filter what should be shown by choosing category and time (time since uploaded content).

So if I choose Category 1 and 1 Month or something like that, it will filter the content on the page to what I choose, without uploading the page. So I would call it something like "Live content filter", I hope you get the idea.

Anyways,
I know how to make all this, but then it's not filtering without going to another page, and I have to make way too many views.

Hopefully someone can help me with this, would be really great.

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

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

发布评论

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

评论(1

南冥有猫 2025-01-10 04:41:31

您可能需要将“视图”设置设置为“使用 AJAX:否” 为“”。这样,公开的过滤器/寻呼机将动态加载过滤后的内容,而无需重新加载页面或转到另一个页面。您可能需要尝试使用“块”显示与“页面”(URL 路径)显示。您可能还需要使用视图参数来减少需要创建的视图数量。

You would want to set your View setting where it says, Use AJAX: No to "Yes". That way and exposed filters / pagers will dynamically load the filtered content without doing a page reload or going to another page. You may have to experiment with using a "Block" display vs. a "Page" (URL path) display. You may also need to use Views Arguments as a way on cutting down on the number of Views you need to create.

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