Drupal - 每种有机组内容类型的单独菜单
在我的网站上,我将两种内容类型设置为有机组节点。
- 体育组
- 教育组
网站上还有各种其他内容类型,设置为标准组帖子。允许用户将内容发布到组中,然后引用该组。
然后,我启用了“组详细信息”块以在每个组上显示,然后显示创建指向=标准组帖子的每个内容类型的内容链接。
我想做的,无论是使用该块完成还是我自己创建,都是限制某些内容类型创建链接到某些组。我不想允许在体育组中创建某些内容类型。我认为这可以通过自定义菜单或块来完成,但不确定所需的 PHP。
On my site I have set two Content Types as Organic Group nodes.
- Sports Group
- Education Group
There are also various other content types on the site, set to be standard group posts.To allows users to post content into groups, which then references that group.
I have then enabled the Group Details block to show on each group, which then shows create content links to each content types that = standard group post.
What I would like to do, whether its done with that block or I create my own is to limit certain content type creation links to certain groups. i.o.w I don't want to allow certain content types to be created in the Sports Group. I think this can be done with a custom menu or block, but unsure of the PHP required.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了一种使用块创建手动菜单的方法。
请点击下面的链接,它解释了一切 - http://drupal.org/node/169126
下面是链接中的文本:
这是我从所有这些中汇总的内容...从组页面创建链接以创建自动分配给该组的内容...
下面的代码被放入一个格式设置为 php 的块中
并且它可以工作!
现在,您需要将其显示在组页面上,并且仅当用户是该组的成员时才显示。因此,在“显示块”部分中,您可以将其放入,它似乎可以工作:
?>
Found a way to create manual menus by using blocks.
Follow the follwoing link which explains it all - http://drupal.org/node/169126
Below is the text from the link:
Here's what I put together from all of this.... To create links from a group page to create content that is automatically assigned to that group...
The code below was put into a block with formatting set to php
And it works!
Now you need to have it show up on group pages and only if the user is a member of that group. So in the "show block" section you can put this in and it seems to work:
?>