Tuesday, June 21, 2011

Example with l of in drupal

l('TITLE','node/33');

Output:
<a href="/?q=node/33">TITLE</a>

l('TITLE','node/33',array('attributes'=>array('target'=>"_blank")));

Output :
<a href="/?q=node/33" target="_blank">TITLE</a>

l('TITLE','node/33',array('query'=>array('disp'=>4),'attributes'=>array
('target'=>"_blank")));

Output :
<a href="/?q=node/33&disp=4" target="_blank">TITLE</a>

l('TITLE','node/33',array('attributes'=>array('target'=>"_blank")),'fragment'=>'comment-
1');

Output :
<a href="/?q=node/33#comment-1" target="_blank">TITLE</a>

l('TITLE','node/33',array('query'=>array('disp'=>4),'attributes'=>array
('target'=>"_blank")),'fragment'=>'comment-1');

Output :
<a href="/?q=node/33&disp=4#comment-1" target="_blank">TITLE</a>

No comments:

Post a Comment