I am creating a listing of custom data using

$output = theme('table', 
		array(
			'header' => $headers,
			'rows' => $rows 
		)
	);

what i would also like is an "Add New" option at the top of the page with a link to the add form, I don't see a method for handling this.

any suggestions?

Comments

joshi.rohit100’s picture

Did you try simple -

$output = "<div>Your Link</div>";
$output .= theme('table', 
		array(
			'header' => $headers,
			'rows' => $rows 
		)
	);
jesterFortyEight’s picture

Not pretty, but it works.

thanks

nitin.k’s picture


$link = l(t('Add New'), '/path');
$output = theme('table', 
		array(
			'header' => $headers,
			'rows' => $rows ,
                        'caption' => $link,
		)
	);