I activated the taxonomy view and activated the comment fields (standard view field). And then an ambush. I can’t change the name of the link either in a view or in hooks. Add a comment to the one I need. Add a review. I get access to arrays, I change. dpm ($ vars) gives that the name and title have changed, and the page is still the same Add a comment. How to win this? At least collect the link to the comments in the view.

This is correct code?

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.