The Stack Overflow podcast is back! Listen to an interview with our new CEO.
2 replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
source | link

I can only advise to use the available API functions.

To build the link use the l function:

$link = l(ucwords($t->name), 'taxonomy/term/' . $t->tid);

You can also pass in an options array, so to add an active class to the link when the link url points to the current page, you could use something like this:

$options = array();
if (arg(0) == 'taxonomy' && arg(1) == 'term' && arg(2) == $t->tid) {
    $options = array('attributes' => array('class' => 'active'));
}
$link = l(ucwords($t->name), 'taxonomy/term/' . $t->tid, $options);

Also, this kind of code shouldn't be mixed directly in a template, especially not the database query. Have a look at the answers to this question for more insight: http://drupal.stackexchange.com/questions/75168/preprocess-functions-and-template-filesPreprocess functions and template files

I can only advise to use the available API functions.

To build the link use the l function:

$link = l(ucwords($t->name), 'taxonomy/term/' . $t->tid);

You can also pass in an options array, so to add an active class to the link when the link url points to the current page, you could use something like this:

$options = array();
if (arg(0) == 'taxonomy' && arg(1) == 'term' && arg(2) == $t->tid) {
    $options = array('attributes' => array('class' => 'active'));
}
$link = l(ucwords($t->name), 'taxonomy/term/' . $t->tid, $options);

Also, this kind of code shouldn't be mixed directly in a template, especially not the database query. Have a look at the answers to this question for more insight: http://drupal.stackexchange.com/questions/75168/preprocess-functions-and-template-files

I can only advise to use the available API functions.

To build the link use the l function:

$link = l(ucwords($t->name), 'taxonomy/term/' . $t->tid);

You can also pass in an options array, so to add an active class to the link when the link url points to the current page, you could use something like this:

$options = array();
if (arg(0) == 'taxonomy' && arg(1) == 'term' && arg(2) == $t->tid) {
    $options = array('attributes' => array('class' => 'active'));
}
$link = l(ucwords($t->name), 'taxonomy/term/' . $t->tid, $options);

Also, this kind of code shouldn't be mixed directly in a template, especially not the database query. Have a look at the answers to this question for more insight: Preprocess functions and template files

1
source | link

I can only advise to use the available API functions.

To build the link use the l function:

$link = l(ucwords($t->name), 'taxonomy/term/' . $t->tid);

You can also pass in an options array, so to add an active class to the link when the link url points to the current page, you could use something like this:

$options = array();
if (arg(0) == 'taxonomy' && arg(1) == 'term' && arg(2) == $t->tid) {
    $options = array('attributes' => array('class' => 'active'));
}
$link = l(ucwords($t->name), 'taxonomy/term/' . $t->tid, $options);

Also, this kind of code shouldn't be mixed directly in a template, especially not the database query. Have a look at the answers to this question for more insight: http://drupal.stackexchange.com/questions/75168/preprocess-functions-and-template-files