Print out custom attributes in template

Permalink
I have a multi select custom attribute tied to a particular page type. I want to be able to print out which items of the custom attribute have been selected within the page's template. Here's what I have:
atts = $c->getCollectionAttributeValue('services'); foreach ($atts as $att) {
if ($att != '') {
echo "<li>$att</li>";
}
}
Using this code, it's partly working, but its also spitting out some weird numbers - am I missing something?

hursey013
 
Remo replied on at Permalink Reply
Remo
You're assuming that every attribute has a single value which is wrong. How would your code work for a complex attribute like address where you have several fields?

Haven't worked with it, but you probably have to use getAttribute to get a reference to the actual attribute object..