I would like to add a additional link into the links list of my node-type teaser-display (where "write a comment", "read more" link are located).

Also I would like to pass some tokens (token module is installed) and parameters to prepopulate some fields (prepopulate module is installed too). On top it would be great to display the linked content in a modal window/box.

There's also a post here for Drupal 6 and 7 but not for Drupal 8: How to programmatically add links to the links variable

I figured out, that I can alter existing links via a mytheme_node_preprocess_function (Edit "Read more" and "Add new comment" links in teaser and the last two days spending on drupalize.me), but is there a way and/or function to add simply a node/my-content-type/add link with some additional parameters for prepopulating fields and display that in a modal window/box ?

Thanks in advance for any hints/coding snippets.

Best regards Phil

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.