I am not a drupal expert and I am a little bit lost in taxonomies so I hope someone can help me a bit..

This bit of code displays all categories (defined in taxonomies) in a page BUT it displays them as a list of links..

print render ($content['field_category']);

I need to get a list of taxonomy names for field_category without links.. Just names.

using this code I am able to get ONE name.

print render ($node->field_category['und'][0]['taxonomy_term']->name);

Can someone help me figure out how I would get the same result that the first line renders but without links?

Thanks!

有帮助吗?

解决方案

I suggest you use views module : Create a Taxonomy View, then add "term field". In field setting, uncheck "show as link" option and you will have your taxonomy list shown without links. Hope that helps you.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top