Drupal在创建新节点时设置相关节点
是否有模块在创建新节点时根据标题和正文列出相关节点,以便用户可以设置多个相关节点。
节点页面上有一个块,其中列出了选定的相关链接集
任何帮助,
谢谢, 艾德文:)
Is there any module which list the related nodes based on the title and body at the time of creating new node, So that the user can set multiple related node.
And there is a block on the node page which list the set of selected related links
Any Help,
Thanks,
Edvin :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 http 来做到这一点: //api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_node_submit/7
You can do that using http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_node_submit/7
对您问题的最直接回答:
为了很好完成这项任务,您所要求的需要非常智能、语义感知的编程 - 即大量复杂的代码。有类似条目模块 - 我还没有尝试过这个,所以不知道这个工作有多好确实如此。很可能,它只会匹配相似的单词,而简单编程识别为相似的单词的文章实际上并不总是关于相似的内容。所以:它会起作用,但不会非常“智能”地匹配。
但是,您也可以考虑:
1. 有可用的模块集成 Web 服务,例如 Calais,它可以帮助您显示其他网站的相关内容(但不是您自己的内容),并以复杂且语言感知的方式进行语义比较。
2. 确保文章内容相似的最佳方法可能是使用分类词汇对您的文章的内容进行分类。然后,您可以确保将分类术语放入带有 Pathauto 的 url 中,并使用url 作为视图中的参数来选择具有相同分类术语的文章。然后,该视图可以显示为块,或嵌入到文章模板中的某个位置。
3. 如果您非常挑剔并决定为每篇文章手动决定它与哪些其他文章相关 - 您可以向您的文章节点添加多组 CCK 节点引用字段,并且只需显示这些。
Most direct answer to your question:
What you are asking, in order to do this task well, requires very smart, semantically-aware programming - i.e., a LOT of complicated code. There is the Similar Entries Module - I haven't tried this, so don't know how good a job it does. Very likely, it will only match similar words, and articles with words that simple programming identifies as similar are not always actually about similar content. So: it will work, but it won't be matching very "intelligently."
However, you could also consider:
1. There are available module-integrated webservices, such as Calais, which can help you show other sites' content that's related - but not your own - and do the semantic comparison in a sophisticated and language-aware manner.
2. Probably the best way to assure that articles which are similar in content is to classify what your articles are about yourself by using a taxonomy vocabulary. You could then make sure that the taxonomy term is put in the url with Pathauto, and use this part of the url as an argument in Views to select articles with the same taxonomy term. This view could then be displayed as a block, or embedded somewhere in your article template.
3. If you get really picky and decide that for each article you want to manually decide which other articles it's related to - you could add a multiple-set of CCK node reference fields to your article node, and simply display these.
我找到了 drupal 模块并做了一些定制,
这里肯定会对你们有所帮助,
节点推荐
I found the drupal module and did some customization,
Here you go sure it will help you guys,
Node Recommendation