简体   繁体   English

如何以编程方式将新创建的节点添加到 Drupal 组模块中的组中?

[英]How to programmatically add newly created node to a group in the Drupal Group Module?

I am creating a management website.我正在创建一个管理网站。 Super admin can create users.超级管理员可以创建用户。 Users can create nodes.用户可以创建节点。 I need to know how to add that newly created nodes to the groups that users are in.我需要知道如何将新创建的节点添加到用户所在的组中。

The group that you want to say is called roles in Drupal.您要说的组在 Drupal 中称为角色

For example: When a user creates a node, this user has a role "editor".例如:当用户创建节点时,该用户具有“编辑者”角色。 Then, the node was created by editor然后,该节点由编辑器创建

Now, if you want to show the role in the content view, you have to edit the view.现在,如果要在内容视图中显示角色,则必须编辑该视图。

暂无
暂无

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

相关问题 Drupal Group 模块,以编程方式将用户添加到具有特定角色的组 - Drupal Group module, add a user to a group with a particular role programmatically 如何以编程方式将表单添加到 Drupal 7 中的节点? - How to programmatically add a form to a node in Drupal 7? 试图以自定义模块形式在drupal中添加“字段组”和“添加更多” - Trying to add 'group of fields' with 'add more' in drupal in a custom module form 如何在Drupal视图中添加DISTINCT,GROUP BY子句 - How to add DISTINCT, GROUP BY clause in drupal view 我在 Drupal 8 中使用 OG 模块。如何在此处为特定组添加角色和角色权限? - I am using OG module at Drupal 8. How to add role and role's permission for particular group here? drupal 7新创建的自定义模块未显示在模块列表中 - drupal 7 newly created custom module does not showing up in module list 如何在Drupal中以编程方式将多个图像添加到节点-如果可能的话 - How to add multiple images to the node programmatically in Drupal - if possible Drupal 7-是否可以将现有文件附加到新创建的节点上? - Drupal 7 - Is it possible to attach an existing file to a newly created node? 如何在drupal 6中将库添加到模块文件中(以运行由flexslider创建的幻灯片) - How to add a library in drupal 6 into a module file ( to run a slideshow created by flexslider ) Drupal,视图模块,布局中的组字段 - Drupal, Views module, Group fields in layout
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM