找出要使用的钩子
我正在开发一个模块,它的功能类似于nodereferences_url。
要实现哪个 Drupal 钩子才能将链接中的链接放入节点内容区域(如附图中突出显示的那样)?
I am working on a module which does something similar to nodereferences_url.
Which Drupal hook to implement to place a link in link into a node content area like is highlighted in the attached image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它是 hook_link() ,描述为:
该钩子的实现示例是 node_link (),包含以下代码:
即当节点内容多于预告片中已显示的内容时,在节点的预告片中添加“阅读更多”链接的代码。
请注意,该钩子是为节点和注释调用的。如文档中所述,
$type
参数可以具有以下值:It is hook_link(), which is described as:
An example of implementation of that hook is node_link(), that contains the following code:
That is the code that adds the "Read more" link in the teaser of a node, when the node content is more than the content already shown in the teaser.
To notice that the hook is called for nodes, and comments. As described in the documentation, the
$type
parameter can have the following values: