ID to the tag assignment
Posted: Sat Apr 30, 2016 4:59 pm
Hello , how can you do want to assign to the tag ID ?
Thank you. This is a question .diego wrote:This is a question or an idea ?
Oky,Edi wrote:What exactly do you want to do? Can you please give an example.
Code: Select all
<div class="tag-id-1"><li><a href="#">Example tags 1</a></li></div>
<div class="tag-id-2"><li><a href="#">Example tags 2</a></li></div>
<div class="tag-id-3"><li><a href="#">Example tags 3</a></li></div>Code: Select all
foreach($tagArray as $tagKey=>$fields)
{
// Print the parent
$html .= '<div class="tag-'.$fields['tagKey'].'"><li><a href="'.HTML_PATH_ROOT.$filter.'/'.$fields['tagKey'].'">'.$fields['name'].' ('.$fields['count'].')</a></li></div>';
}You 're a great brother! Thank you. So how can you answer my other question?Edi wrote:If you want add a class for example to the plugin Tags list why not like this (line 73):
By the way: I would a class not give a name with "id".Code: Select all
foreach($tagArray as $tagKey=>$fields) { // Print the parent $html .= '<div class="tag-'.$fields['tagKey'].'"><li><a href="'.HTML_PATH_ROOT.$filter.'/'.$fields['tagKey'].'">'.$fields['name'].' ('.$fields['count'].')</a></li></div>'; }