0

menu_token module is working fine to achieve the purpose. Does the module token_filter has this functionality? I can use tokens in wysiwyg using token_filter but cannot make it working for menu title or url since there is no setting I could find. Since the comment in drupal issue says that it was solved using token_filter module, I want to know the way it was achieved.

2 Answers 2

1

No, not by itself. The Token Filter module's functionality adds a token input filter to text formats in Drupal. The only field types that can use text formats are the 3 Text (formatted) field types, not the Link field type.

One can only speculate on the comment's solution you refer to. Text Formats/Input filters are designed to allow HTML input that should be filtered for presentation. It would be an odd-use-scenario to apply that to a link field.

1
  • Any alternate to menu_token module? Commented Mar 31, 2020 at 14:46
0

Approach to solve the problem-

  1. Loop through menu links (optionally title) in custom module
  2. Process the tokens using \Drupal::token()->replace() method

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.