Active
Project:
Views Node Feed
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2011 at 19:33 UTC
Updated:
30 Mar 2011 at 20:48 UTC
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
Comment #1
aasarava commentedThanks 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.