adding attributes using the "l" function

2 views
Skip to first unread message

Rick Hurst

unread,
Nov 5, 2007, 2:09:49 PM11/5/07
to bristol...@googlegroups.com
I have a snippet of code i'm using to render links in a custom module
that uses one of the built in functions of.. er.. not sure whether it
is phptemplate or other drupal machinery, but looks like this:-

$block_content .= l($links->title, 'node/'.$links->nid)

i'd like to add some more attributes to the links - can anyone point
me in the direction of some examples of usage of this function? I'll
even RTFM if someone can tell me which one ;-)

--
Rick Hurst, Web developer, Bristol, England
http://www.rickhurst.co.uk

J Norton

unread,
Nov 6, 2007, 7:31:52 AM11/6/07
to bristol...@googlegroups.com
Hey Rick,

I think this link may help explain theming the l function:

http://www.group42.ca/creating_links_aka_anchor_tags_the_l_function

The following link is also good if your <a> tag is being called from an _theme function:

http://www.usingdrupal.com/article/using-css-tab-designer-with-zen-theme

Cheers,

Justin.


For ideas on reducing your carbon footprint visit Yahoo! For Good this month.

Rick Hurst

unread,
Nov 6, 2007, 8:19:46 AM11/6/07
to bristol...@googlegroups.com
Hi Justin

On 11/6/07, J Norton <jus...@jnorton.co.uk> wrote:

> I think this link may help explain theming the l function:
>
> http://www.group42.ca/creating_links_aka_anchor_tags_the_l_function

Perfect - exactly what I was looking for :)

>
> The following link is also good if your <a> tag is being called from an
> _theme function:
>
> http://www.usingdrupal.com/article/using-css-tab-designer-with-zen-theme


cheers, will take a look at that too

Reply all
Reply to author
Forward
0 new messages