将“添加新评论”替换为Drupal 中的图像链接

发布于 2024-08-29 14:37:48 字数 220 浏览 5 评论 0原文

有没有一种简单的方法可以将 Drupal“添加新评论”链接转换为“添加新评论”gif 图像?

添加链接的语法似乎是

 <?php if ($links): ?>
    <div class="links"><?php print $links; ?></div>
 <?php endif; ?>

Is there an easy way to convert Drupal "add new comment" link into an "add new comment" gif image?

Syntax that adds link appears to be

 <?php if ($links): ?>
    <div class="links"><?php print $links; ?></div>
 <?php endif; ?>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

§对你不离不弃 2024-09-05 14:37:48

$links 内置在 template.php 中,模块可以添加到其中。

$links 是一个

    并且该特定链接是

您可以使用 css 为 li.comment_add 提供一个{background= ..} 并在您的 themename_node_preprocess(&$vars) 之一中使用 str_replace 并从 $vars['links'] 中删除“添加新评论”

$links is built in your template.php and modules can add to it.

$links is a <ul> and that particular link is <li class="comment_add">

you can use css to give li.comment_add a{background=..} and use a str_replace in one of your themename_node_preprocess(&$vars) and remove "Add new comment" from $vars['links']

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文