How to output a custom field in my template? In my content type I have created a custom field field_image_style which is a list (text).

How can I print its value in node.tpl.php?

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


This doesn't work?

(What I actually want to achieve later is to use the selection the user made in field_image_style to apply a specific image style to the images of the content element.)

EDIT: Somehow the Zen theme was the reason. With my own Stark based theme it works like it's supposed to.
This is a perfect use case for the Field Formatter CSS Class module.

After adding a text list, radio, or taxonomy field to a content type, you then put the field on the view mode you would like for the class to be on. Use the CSS Class formatter and what level you would like to apply the class (generally node is fine), then you can add your CSS rules for whatever you want.

For example, you can change the individual caption background color on slides in a rotator, or specific stylings per post in a blog feed.