I'm using the XML feed and don't want empty nodes when the field is empty in the view, I've thrown the code below into views-bonus-export-xml.tpl.php

<?php if($content): ?>
<<?php print $label; ?>><?php print $content; ?></<?php print $label; ?>>
<?php endif; ?>

This works fine but would be good to have this as an optional setting within the style options.

Comments

aasarava’s picture

Thanks for the code snippet, timdiacon. That was very helpful. I was looking to do the same thing and agree with you that it would be good to have it as an option setting with the style options.