0

Suppose I want to use a paragraph field value of an entity for metatag title (by using metatag views module)

I can successfully get the value of the paragraph entity and display it on the view

enter image description here

Now, is there a way i can save those field to a token so i can use it here? enter image description here

enter image description here

Regards,

  • 1
    anything is possible..if you can write code :) – user21641 Jul 24 '18 at 6:17
  • @IvanJaros I can actually code :) Do you know where should I start? – arvil Jul 24 '18 at 6:46
  • 1
    Do you know where should I start? start by creating a token – No Sssweat Jul 24 '18 at 8:14
1

I do not believe this is possible if paragraphs module does not provide this token itself. The way to do it would be to create your own token. Even with this it may be tricky to figure out that information.

To create your own token you will need to look into the hook_token_* items such as hook_token_info.

It sounds like to me your best bet would be attempting to hook into the views pre processing and change the value that way.

  • Yup, i solved the problem by creating a custom token. Thanks to all! – arvil Jul 26 '18 at 0:18

Your Answer

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

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