M
M
maiskiykot2019-10-21 17:29:35
Drupal
maiskiykot, 2019-10-21 17:29:35

How to rename comment links on taxonomy page?

The point is this. Activated the taxonomy view and activated the fields for adding comments (standard view field). And then there's the ambush. I can't change the name of the Add comment link to the one I need Add a review neither in the view nor in the hooks. I get access to arrays, I change. dpm($vars) shows that the name and title have changed, but the page is still the same Add a comment. How to win it? At least collect the link to the comment in the view.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
maiskiykot, 2019-10-22
@maiskiykot

Why I love Drupal. You can lose a day, and then fly in five minutes. I ended up changing the output in the views. The hooks didn't work.

A
andead, 2019-10-21
@andead

function hook_preprocess_node(&$vars) {
  $vars['content']['links']['comment']['#links']['comment-add']['title'] = 'test';
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question