Hide Drupal nodes from search(从搜索中隐藏 Drupal 节点)
问题描述
我通过编写一个模块来检查该部分的 RERQUEST_URI 以及用户角色,从而在 drupal 站点上创建了一个私有部分.我现在遇到的问题是如何防止这些节点/视图出现在搜索中.
I made a private section on a drupal site by writing a module that checks the RERQUEST_URI for the section as well as user role. The issue I am running into now is how to prevent those nodes/views from appearing in the search.
私有部分中使用的内容类型在网站的其他地方使用.
The content types used in the private section are used in other places in the site.
让 Druapl 搜索忽略内容/不索引/不在搜索结果中显示它的最佳方法是什么?
What's the best way to get Druapl search to ignore the content/not index/not display it in search results?
推荐答案
摇篮机器人 网站.
这篇文章的评论也值得一读,因为那里的人建议了其他方法来做到这一点,也是通过 contrib 模块(而不是在您自己的代码中实现一些钩子).D6 的代码也在注释中.
It's worth reading the comments to the post too, because people there suggested alternate ways of doing that, also by mean of contrib modules (rather than implementing some hooks in your own code). Code for D6 is in the comment as well.
HTH!
这篇关于从搜索中隐藏 Drupal 节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:从搜索中隐藏 Drupal 节点


- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- PHP - if 语句中的倒序 2021-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01