in Magento 2 I am getting a product link from an attribute like so
<?= $_product->getData('ecc_related_documents_synced') ? '<a href='.$_product->getData('ecc_related_documents_synced').' ><span class="data-sheet"> </span><a>' : '';?>
and i need to add a tab url href to the end of
#relateddoc
'<a href='.$_product->getData('ecc_related_documents_synced').'#relateddoc ><span
...? (These attribute values should really rather be put into quotes though.)#relateddoc
to the URL you are outputting as the value of thehref
attribute there, yes. But why don't you just test it, and see if it achieves what you want/need?