How to alter output of markup on a specific views field Is there a way to change the output programatically on a specific field in d8 views?
I have a field called 'IMCID' which I want to output as a link, but the link is going to change based on the value of another field for that row.
For example, if IMCID of row #1 is 15, and Format of row #1 is 'Copy', then I want the output URL to be something like example.com/copy/15, however if IMCID of row #1 is 15, and Format is 'Hard Copy', then the output URL would be example.com/hardcopy/15
If possible, I would like to avoid making multiple template files for individual fields, as this functionality will be carried over onto other fields later on, and would rather not have to manage a ton of template files.
I have tried using hook_pre_render() and hook_post_render(), but the markup doesn't appear to be in this hook so I am not sure how to update the link URL.
Views is mainly a UI tool, also for theming. Check this box in the field:

REWRITE RESULTS
[x] Override the output of this field with custom text

This opens a text box which accepts Twig code and field tokens of other fields which are placed above. Exclude those fields from display if you want to us them only in Twig. You can check the available tokens in REPLACEMENTS PATTERN below the text box. Look in REPLACEMENT PATTERNS for raw field values, don't use formatted output in Twig logic.