I was playing around with the taglinks snippet, and thought of a way to get rid of the separator after the last tag item.
I’m not a PHP-expert (yet

) but maybe this is a solution for some of us, at least for me it is working great:
First of all, you have to make sure that you use friendly paths, and that the paths are named the same as your tags.
For instance if you have two categories: ’category1’ and ’category2’, than you should make sure that the path to the category (landing) pages are also "...yourpath/category1" and "...yourpath/category2".
Then, you can replace the following code in the tagLinks snippet (I am using version 1.0.1):
/**
* Create a series of HTML anchors with hrefs if &format
* is set to `a`.
*/
if ($format == 'a'){
$link .= "$label";
foreach ($tvarray as $value){
$url = str_replace(' ', '', $value);
$link .= '<a href="'.$doc_path.strtolower($url).'">'.$value.'</a>'.$separator.$nl;
}
} else {
Replace it with this code:
/**
* Create a series of HTML anchors with hrefs if &format
* is set to `a`.
*/
if ($format == 'a'){
$lasttag = array_pop($tvarray);
foreach ($tvarray as $tagwithlink){
$withlinks = str_replace('%taglink%', $tagwithlink, '<a href="[(baseurl)]'.$path.'/%taglink%" class="'.$style.'">%taglink%</a>'.$separator.' ');
print_r($withlinks);}
$lastwithlinks = str_replace('%taglinklast%', $lasttag, '<a href="[(baseurl)]'.$path.'/%taglinklast%" class="'.$style.'">%taglinklast%</a>');
print_r($lastwithlinks);
} else {
You can see that I split the inital array in to two variables, one containing the tags without the last tag, and one variable with just the last tag. This way you can present both variables, and do something different with the last tag item. Maybe this is not a ’beautiful’ code, but it is simple and it does its job.