Quantcast
Channel: Arnelbornales's Blog » arnelbornales
Viewing all articles
Browse latest Browse all 10

How to create a image link in drupal using l() function

$
0
0

this snippet enables you to create a image link

<?php
$src = path_to_theme().'/images/images.jpg';
<?php print l('', 'LINK-TO-PAGE', array('attributes' => array('class' => 'anchor-class'), 'html' => TRUE));
?>

notice there are 3 parameters: l(1st_param,2nd_param,3rd_param);

1st_param: the html image
2nd_param: the url/path
3rd_param: we add class in our anchor tag and enable html to TRUE

Hope this helps you guys!

http://www.arnelbornales.site90.net/blog



Viewing all articles
Browse latest Browse all 10

Trending Articles