Keyword

Getting lowercase K2 Tags in URLs

  • Alan Sparkes
  • Alan Sparkes's Avatar Topic Author
  • Offline
  • Premium Member
More
11 years 2 months ago #116223 by Alan Sparkes
Getting lowercase K2 Tags in URLs was created by Alan Sparkes
Thanks to the awesome new URL settings we have managed to ditch sh404.
However the tag urls are still in title case.
EG we have " domain / lowercase prefix for tag urls / Tag name"

It doesnt appear possible to set the tag name to lowercase in the URL
In advanced config you can set lowercase or uppercase settings for tags.
I have normalisation turned off (separate issues with that) and settings for 'Tag character case' are lower

Crucially, Admins and editors want all their tags in title case Eg "Blue, Red, Green" ...Not 'BLUE, RED, GREEN" and not "blue,red,green"

A quick look at the router.php shows no use of the tag settings from config so in order to get them lower case we added to line 234 or the main router.php

Question: is this the intention of "Tag character case" settings and it was left out of the router? ANy reason why it shouldn't be:) ?
 //joomkit    
 if($params->get('k2TagNormCase') == 'lower'):
    $segments[2] = strtolower($segments[2]);
 endif;
 //end

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum