2011-06-19, 21:58:15
yojoe Wrote:I find the tag list feature very useful. Especially when normal user can maintain it pretty easy.
But I have a question. Tags are printed as normal text, and supposing I'd want to display every tag as a link to search result, where page containing such tags, and words in content would be listed, how could I achieve it ?
I suppose I'd have to link to page with search results and use tags from the list as params.
yes, look at i18n_search/tags.php and output an <a href="/my-search-result-page?tags=the-tag" ...> instead of the <span ...>.
yojoe Wrote:edit: a sidequestion
get_i18n_tags(), and return_i18n_tags() show all tags. Is there a way to disable listing tags defined for currently visited page ?
There is no function to do this - why do you want to do this?
But you can do it like this:
Code:
$slug = return_page_slug();
$tags = return_i18n_tags();
$filtered_tags = array();
foreach ($tags as $tag => $urls) {
if (!in_array($slug, $urls)) $filtered_tags[$tag] = $urls;
}