By jnvsor on
I know I've seen it somewhere before, but I don't know where.
How do I make the following link have a target=_blank attribute?
<?php
$link = array(
'#type'=>'link',
'#href'=>$url,
'#target'=>"_blank", // This is the only part that doesn't work
'#title'=>t("View on Google Maps"));
?>
Comments
Answer was in the doc ;)
As you can see there : https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_pr...
'#target' don't exist, you are suppose to use '#options'