Views: Display filters as a HTML UL list of links with clean mark up I have a View that has a filter which allows users to select nodes that contain specific taxonomy terms. 

I would like to display this as a HTML list of links (&lt;ul&gt;). How can I do this?



Steps I have tried 

1. Using Better Exposed filters 

This displays a filter as links. But the links are displayed wrapped in &lt;Div&gt; tags instead  of a UL tag.

2. Using Views template

Using views-exposed-form.tpl.php lets you access the exposed form, but it doesn't let you access the actual widget the makes up the filter.

3. Using Custom Code

This page says you can turn a select list into links via a custom module. But it requires Javascript to make the links work, which seems bad practise to me
I would also go for step 3 and you really need JS for that option. Another option is, structure the links as it looks when you do a search like so..

// Merge the option name or key into the link
$link = "your-view?category=" . $select_option;
// Create the link
$somearrayforULlist[] = l($select_option, $link);


So when you click one of the links, it would reload the page and your view will use the filter values in the URL in your form.