By JackKannof on
Hi there I ran into a problem with a combination of the taxanomy module, pathauto and contemplates.
Currently I use this to output the Terms in the Vocabulary "State"
State: <?php foreach ((array)$taxonomy as $item) { ?>
<?php if ($item->vid == 1): ?>
<a href="<?php print base_path() . "taxonomy/term/" . $item->tid; ?>"><?php print $item->name ?></a>
<?php endif; ?>
Which would output something Like: taxonomy/term/1
But I also use Pathauto to set an alias to: state/new-york
and I would therefore rather output the alias like this
State: <?php foreach ((array)$taxonomy as $item) { ?>
<?php if ($item->vid == 1): ?>
<a href="<?php print base_path() . "state/" . $item->name; ?>"><?php print $item->name ?></a>
<?php endif; ?>
but that would output: state/New York
Could anyone perhaps explain how i could get rid of the capitals and convert spaces to dashes in between? I imagine this should be possible.
Cheers