<?php
        $category = get_the_category();

        if($category[0]->slug == 'articles'){
            if($this->data['instance']['title'] == 'Categories'){
                return false;
            }
            echo str_replace('Categories','Legal Areas', $this->data['html']['start']);
        }else{
            echo $this->data['html']['start'];
        }
        if($this->data['instance']['title'] == 'Areas of Interest'){
            query_posts('category_name=articles');
        }else{
            if(!empty($category[0]->slug)){
                query_posts('category_name=' . $category[0]->slug);
            }else{
                query_posts('category_name=articles');
            }
        }
        if (have_posts()) : while (have_posts()) : the_post();
            $posttags = get_the_tags();
            if ($posttags) {
                foreach($posttags as $tag) {
                    $all_tags_arr[$tag->slug] = $tag->name;
                }
                asort($all_tags_arr);
            }
        endwhile; endif;
?>
		<ul class="list-0 category-list">
            <?php foreach($all_tags_arr as $tag_slug => $tag_name) : ?>
                <li class="cat-item">
                    <a href="<?php echo home_url() . '/tag/' . $tag_slug ?>"><?php echo $tag_name; ?></a>
                </li>
            <?php endforeach; ?>
			<?php //wp_list_categories(array('title_li'=>'','hierarchical'=>'false','current_category'=>get_query_var('cat'))); ?>
		</ul>
<?php 
		echo $this->data['html']['stop']; 
?>