寻找一个在删除节点时重定向 Pathauto url 的 Drupal 模块
寻找 Drupal“删除时重定向”模块。
我们有一个基于 drupal 构建的分类列表网站,因此我们有大量的列表被发布,然后持续从网站中删除。目前,当列表从网站中删除时 未发布的网站(不会删除任何内容),并将用户重定向到类似列表的搜索,并给他们一个很好的“您要查找的列表不再列出,这里有更多类似的列表”。
我们将其保留为 开始归档列表并从站点中删除旧的未发布列表我们需要一个模块来保留已删除节点的 PathAuto 生成路径,并在 301 中将用户重定向到该列表的搜索结果这应该在列表被删除后自动发生。 ,根据节点的分类,
我知道 path_redirect 模块不提供我们正在寻找的自动功能,在构建我自己的模块之前,我想我应该在这里发布一个问题,看看是否有我遗漏的东西。
Looking for a Drupal 'Redirect When Deleted" module.
We have a classifed listing site built on drupal , so we have large numbers of listings that are published and then removed from the site on an ongoing basis. Currently when a listing is removed from the site we leave it unpublished (no content is ever deleted) and redirect the user to a search for simular listings. Giving them a nice "The listing you are looking for is no longer listed, here are more like it."
We are looking to start archiving listings and removing the old unpublished listings from the site. We need a module that will keep the PathAuto generated path from the deleted node and 301 redirect the user to a search result for that listing. This should happen automatically once the listing is deleted, based on the taxonomy of the node.
I'm aware of the path_redirect module. It does not provide the automatic functionality we are looking for. I've searched around and before building my own I figured I'd post a question here, see if there is something that I'm missing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里有点鲁莽,但听起来好像你需要自定义功能。在
hook_nodeapi()
$op == 'delete' 上,您希望使用path_redirect_save()
将节点的当前别名保存为指向搜索页面的重定向。path_redirect 的维护者可能会接受此功能作为可配置选项。
Kind of shooting from the hip here, but it sounds as though you need custom functionality. On
hook_nodeapi()
$op == 'delete' you want to usepath_redirect_save()
to save the node's current alias as a redirect pointing to the search page.This functionality might be something the maintainer of path_redirect would accept as a configurable option.