How to theme a link in a D7 render array? I'm trying this:


        $content[] = array(
          '#theme' =&gt; 'link',
          '#text' =&gt; $row-&gt;title,
          '#path' =&gt; $base_path . 'node/' . $row-&gt;nid,
          '#attributes' =&gt; array('attributes' =&gt; array('title' =&gt; $row-&gt;title)),
          '#prefix' =&gt; '&lt;h3&gt;',
          '#suffix' =&gt; '&lt;/h3&gt;',
        );



but Drupal is complaining that "Arg 1 passed to drupal_attributes() must be an array, null given" My array looks fine? ...or does it xD

Here is the API doc I'm looking at
The theme_link() function behaves a bit like the l() function; the attributes array needs to be inside an #options property:

$link = array(
  '#theme' =&gt; 'link',
  '#text' =&gt; $row-&gt;title,
  '#path' =&gt; $base_path . 'node/' . $row-&gt;nid,
  '#options' =&gt; array('attributes' =&gt; array('title' =&gt; $row-&gt;title)),
  '#prefix' =&gt; '&lt;h3&gt;',
  '#suffix' =&gt; '&lt;/h3&gt;'
);

echo render($link);