I’m trying to get clean output of fields in order to obtain semantic code.
In the default template generated by the Views module the snippet which outputs the field is:
<?php print $field->content; ?>
But a lot of markup is generated along with the value of the field.
Is there a way to get the field value directly?
I’m using Drupal 7, It seems like the old method:
$fields['field_name']->content;
is not functioning anymore.
Thank you in advance for your help.
Semantic Views is a great module which gives a great control over the views output markup. But I realized that my problem was related to the field markup.
I found a video tutorial. It helped me a lot and hope could help others too.
Theming Fields video tutorial.