Drupal:如何从分类术语中删除链接? [英] Drupal: how can I remove the links from taxonomy terms?

查看:164
本文介绍了Drupal:如何从分类术语中删除链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢我的节点页面中的分类术语,但是我不希望用户能够点击它们。我只想删除链接。

I like the taxonomy terms in my nodes pages, but I don't want user being able to click on them. I just want to remove the links.

我试图从分类模块php文件中删除它们,但我找不到它们。

I'm trying to remove them from taxonomy module php files, but I cannot find them.

谢谢

推荐答案

你永远不想编辑核心模块,如分类法,因为这使得它非常复杂升级您的Drupal安装。 另请参见

You never want to edit a core module like taxonomy, as this makes it very complicated to upgrade your Drupal install. See also.

您可以使用<一个href =http://api.drupal.org/api/function/hook_link_alter/6 =nofollow noreferrer> hook_link_alter 来更改/删除自己的模块中的链接。将它们添加为非链接有点复杂,但可以在您的node.tpl.php文件中使用示例代码

You can use hook_link_alter to alter/remove the links in your own module. Adding them back in as non-links is a little more complicated, but can be done in your node.tpl.php file with example code.

这篇关于Drupal:如何从分类术语中删除链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆