Not sure what i am doing wrong here. I tried to piece this together through different google searches but its not working. Would be grateful for someone pointing me in right direction. Am trying to get the link to open up in a new window.

print l(t('LinkName'),'http://www.linkaddress.com', array('target' => '_blank');

cheers!

Comments

nevets’s picture

I think you want

print l(t('LinkName'),'http://www.linkaddress.com', array( 'attributes' => array('target' => '_blank')));

This should print a link that when clicked opens in another window.

calebm12’s picture

Works like a charm. Thanks for your help!