I've been attempting to solve this issue for the past few hours but haven't gotten any closer to a resolution. I'm attempting to return the string value for a link target attribute inside of a D8 paragraph template:
When I do a var dump on the field using machine name (field_link_cta), doing the following
{{ dump(content.field_link_cta['#items'].getValue()) }} I get the resulting return values:
I can traverse the variables to return the title ok, but for some reason can't get to the link attributes?
{{ content.field_link_cta[0]['#title'] }} - Works, returns value.
{{ content.field_link_cta[0]['#options']['#attributes']['#target'] }} - Does not work, returns no value.
What am I missing here? Given that I've stepped through the variables listed in the variable dump, shouldn't the 'target' attribute string be returned, exactly like the title? Is there a better way of checking context here for this variable?
Any pointers would be greatly appreciated.
Thanks for your help!
Mark.

