简体   繁体   English

用户为自定义视图选择节点(DRUPAL)

[英]User selects nodes for a custom view (DRUPAL)

all, I hope you can either help me, or direct me the the easy-to-find-in-retrospect answer which is already out there. 总而言之,希望您能对我有所帮助,或指导我找到容易找到的答案。

I have had two drupal RFPs in the past month where the admins maintains content, but wants users to be able to mark nodes for viewing later in their own custom view. 在过去的一个月中,我有两个drupal RFP,管理员在其中维护内容,但希望用户能够标记节点以便以后在自己的自定义视图中查看。

in both cases, the user should be logged in, and the selections that they make should be associated with their account. 在这两种情况下,都应该登录用户,并将他们所做的选择与他们的帐户相关联。

example: There is an event calendar where the user may select events that they wish to attend. 示例:有一个事件日历,用户可以在其中选择他们希望参加的事件。 at a later time, the user may go to a "my events" page and see their pesonal schedule. 在稍后的时间,用户可以转到“我的事件”页面并查看其个人日程表。

a slightly more complex example would be where a user could select images from a portfolio to be later outputted to a custom pdf - in this case the user might want several portfolios. 一个稍微复杂一点的示例是用户可以从投资组合中选择图像,然后将其输出到自定义pdf-在这种情况下,用户可能需要多个投资组合。

The only (very clumsy seeming) solution I could come up with involved a hack whereby selecting a node would trigger a some code that added a tag to the node that was the user's name. 我能想到的唯一(非常笨拙的)解决方案涉及一种黑客攻击,即选择一个节点将触发一些代码,该代码向该节点添加了一个标记,即用户名。 then later an view-with-argument could be used to call only nodes with that tag. 然后可以使用带参数的视图仅调用带有该标签的节点。 in the latter situation, that tag might even have to be userName+portfolioNumber 在后一种情况下,该标签甚至可能必须是userName + portfolioNumber

this seems... not ideal. 这似乎...不理想。 I have not been able to isolate the correct secret google search that reveals the standard way to do this - feel free to point me there as well. 我无法隔离出正确的Google秘密搜索来揭示执行此操作的标准方法-也可以随时将我指向此处。 (heck I prove to be bad at all drupal research for that matter) (在这方面,我被证明对所有Drupal研究都是不好的)

Thanks in advance! 提前致谢!

For events which are a bit special and more cpmplex there is a lot of modules for doing things like that. 对于有些特殊和cpmplex的事件,有很多用于执行此类操作的模块。 I've used the signup module in the past and been happy about that. 我过去曾经使用过注册模块,对此感到很高兴。

For general marking of content, I think the flag module will get you where you want. 对于内容的常规标记,我认为标记模块将使您到达所需的位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM