드루팔 내장 링크 함수 l()을 이용해서 새 창 링크(target="_blank")를 추가하고 싶은 경우

전에 드루팔 내장 번역 함수 t()와 드루팔 내장 링크 함수 l()을 간단히 설명했었다.

드루팔 내장 링크 함수 l()을 이용해서 새 창 링크(target="_blank")를 추가하고 싶은 경우
에는 배열 형태의 파라미터로 HTML의 속성에 새 창 링크를 추가할 수 있다.

아래 간단한 예제가 있다.

l(&quot;linktext&quot;,<br />&nbsp; $args,<br />&nbsp; array(<br />&nbsp;&nbsp;&nbsp; &quot;title&quot; =&gt; &quot;the title&quot;<br />&nbsp;&nbsp;&nbsp; , &quot;target&quot; =&gt; &quot;_blank&quot;<br />&nbsp;&nbsp;&nbsp; , &quot;name&quot; =&gt; &quot;an_anchor&quot;<br />&nbsp;&nbsp;&nbsp; //, &quot;class&quot; =&gt; &quot;a-css-class&quot;<br />&nbsp;&nbsp;&nbsp; //, &quot;style&quot; =&gt; &quot;text-decoration: none; &quot;<br />&nbsp;&nbsp;&nbsp; // there are 30 more attributes possible for &lt;a&gt; ;)<br />&nbsp; ),<br />&nbsp; $script)<br />)

위 예제는 아래 주소에서 참고했다.
http://drupal.org/node/146

l()함수에 대한 API 설명서는 다음 주소에 있다.
http://api.drupal.org/api/function/l/6

No votes yet