drupal视图对此用例有用 [英] Is a drupal View useful for this use case

查看:136
本文介绍了drupal视图对此用例有用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要显示给用户的节点列表。用户然后选择3,我需要记住这个决定,所以我可以在稍后的一个较小的列表(您的选择列表)中呈现它们。



要显示节点的完整列表,我将只使用视图来获取所有发布的节点。



问题是如何存储这3个选项,以便我们将其拉入您的选择列表?我应该用什么结构来保存它们?创建名为list或使用视图的内容类型。不确定,或者这个用例有什么更合乎逻辑的?

解决方案

你绝对要仔细看看标志模块。它提供了一个灵活的系统,用于标记(或标记)节点,用户和评论,以及良好的视图集成。



使用此功能,您可以创建一个标志 ',将其设置为每个用户,您的用户可以使用它来标记节点。通过视图集成,您可以通过多种方式在这些标记上创建自定义视图过滤,从而可以轻松创建显示收藏夹的页面和块。



我不是确定如果它支持对例如的限制每个用户开箱即用三个标志,但它也附带一个API,所以你应该能够影响这样的东西(不用担保,但是)

你可能也想检查以下内容,但我没有使用它们的经验,所以不知道他们是否适合您的帐单:




I have a list of nodes that I want to present to the user. The user then picks 3 and I need to remember that decision so I can present them in a smaller list later (your choices list).

To present the full list of nodes, I will just use views to get all published nodes.

The question is how do I store those 3 choices so I can pull them in the "your choices list"? What structure should I use to save them? create a content type called list or use views. Not sure, or there's something more logical for this use case?

解决方案

You most definitely want to take a closer look at the Flag module. It provides a flexible system for 'flagging' (or marking) nodes, users and comments, along with good views integration.

Using this, you could create a flag 'favorite', set it as 'per user' and your users can use this to mark nodes. With the views integration, you can create custom views filtering on those flags in many ways, thus you can easily create pages and blocks that display those favorites.

I'm not sure if it supports a limitation to e.g. three flags per user out of the box, but it also comes with an API so you should be able to influence things like that (no guarantee, though ;)

You might also want to check the following, but I have no experience using them, so no idea if they are good and/or fit your bill:

这篇关于drupal视图对此用例有用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆