&amp;s=popularity"><?php 
echo WoW_Locale::GetString('template_search_filter_popularity');
?>
</a> 
</div>
<div class="search-categories">
<?php 
if (!WoW_Search::IsOnlyOnePageFound()) {
    echo WoW_Search::GetResultsCount() == 0 ? null : sprintf('<a class="type-search%s" href="search?q=%s">%s</a>', WoW_Search::GetCurrentPage() == 'search' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_all'), WoW_Search::GetResultsCount()));
}
echo WoW_Search::GetArenaTeamsSearchResultsCount() == 0 ? null : sprintf('<a class="type-wowarenateam%s" href="search?q=%s&amp;f=wowarenateam">%s</a>', WoW_Search::GetCurrentPage() == 'wowarenateam' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_arenateams'), WoW_Search::GetArenaTeamsSearchResultsCount()));
echo WoW_Search::GetNewsSearchResultsCount() == 0 ? null : sprintf('<a class="type-article%s" href="search?q=%s&amp;f=article">%s</a>', WoW_Search::GetCurrentPage() == 'article' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_articles'), WoW_Search::GetNewsSearchResultsCount()));
echo WoW_Search::GetCharactersSearchResultsCount() == 0 ? null : sprintf('<a class="type-wowcharacter%s" href="search?q=%s&amp;f=wowcharacter">%s</a>', WoW_Search::GetCurrentPage() == 'wowcharacter' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_characters'), WoW_Search::GetCharactersSearchResultsCount()));
echo WoW_Search::GetItemsSearchResultsCount() == 0 ? null : sprintf('<a class="type-wowitem%s" href="search?q=%s&amp;f=wowitem">%s</a>', WoW_Search::GetCurrentPage() == 'wowitem' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_items'), WoW_Search::GetItemsSearchResultsCount()));
echo WoW_Search::GetPostsSearchResultsCount() == 0 ? null : sprintf('<a class="type-post%s" href="search?q=%s&amp;f=post">%s</a>', WoW_Search::GetCurrentPage() == 'post' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_forums'), WoW_Search::GetPostsSearchResultsCount()));
echo WoW_Search::GetGuildsSearchResultsCount() == 0 ? null : sprintf('<a class="type-wowguild%s" href="search?q=%s&amp;f=wowguild">%s</a>', WoW_Search::GetCurrentPage() == 'wowguild' ? ' selected' : null, WoW_Template::GetPageData('searchQuery'), sprintf(WoW_Locale::GetString('template_search_results_guilds'), WoW_Search::GetGuildsSearchResultsCount()));
?>
</div>
<?php 
switch (WoW_Search::GetCurrentPage()) {
    case 'wowcharacter':
        WoW_Template::LoadTemplate('block_search_table_characters');
        break;
    case 'wowitem':
        WoW_Template::LoadTemplate('block_search_table_items');
        break;
    case 'article':
        WoW_Template::LoadTemplate('block_search_table_articles');
        break;
    case 'wowguild':
        WoW_Template::LoadTemplate('block_search_results_guilds');