Getting tags with live links

I am trying to figure out how to display all tags with corresponding links on the browse page. Right now, all tags display without link using this php snippet:

<?php  
        $tags = get_db()->getTable('Tag')->findBy(array('type'=>'Item'));        
        foreach ($tags as $tag) {
            echo "<button type=\"button\" class=\"btn-tags\">" . $tag . "</a></button>";
            }
        ?>

How do I call the tags with links via php?

Thanks
Brendan

The way Omeka does it elsewhere is a line like this:

'<a href="' . html_escape(url('items/browse', array('tags' => $name))) . '" rel="tag">' . html_escape($name) . '</a>'

$name is the tag name.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.