Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.5
Component:
node data
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2009 at 13:34 UTC
Updated:
15 Apr 2011 at 09:35 UTC
Jump to comment: Most recent
Comments
Comment #1
mark trappHaving the exact same problem. Field is set to output as a link using a replacement pattern: I expect it to not print anything if the field is empty, but instead it rewrites the field to include the link in all cases. A workaround is to hardcode the replacement in the template files, but that's less than ideal.
Comment #2
michellezeedru commentedSubscribing to this issue... having the same problem and looking for a solution. Thanks to anyone who can help with this!
Comment #3
seattlehimay commentedSubscribing. I'm having the same problem, and haven't found a clean solution.
Comment #4
son of nun commentedI am also looking for a solution. Any help or trick would be welcome.
Comment #5
awolfey commentedMy solution was to use a custom views field template. That solved it for me. I have not checked since then to see if the problem is fixed.
Comment #6
BenGman commentedSubscribing
Comment #7
merlinofchaos commentedThis isn't really a bug, it's a feature request. One I intend to work on (maybe someone would like to write a patch?) to provide special handling for empty fields.
Comment #8
merlinofchaos commentedChecked in a new system to allow this to happen.
Comment #9
awolfey commentedExcellent! Thank you. I needed this again just today.
Comment #11
michellezeedru commentedSorry to comment on a closed issue, but I am using Views 2.6, and don't see the system for handling empty fields. I'm not exactly sure what "checked in a new system to allow this to happen" means. Has this feature has been added? Am I missing this functionality somewhere (looking in the configure field settings)? Is this in dev only? Please advise.
If this has been added and I'm just not seeing it, thanks for adding this feature!
Comment #12
Kakulash commentedIt's in the latest dev version.
Thanks for adding this! Wish I had seen this post before I had made my own. Going back to take care of that one...
Comment #13
marcoka commentedIf the data of a string supplying field is empty and used to generate a link, the link is generated.
For example: You post pictures that have an filefield(required) and an additional textfield(not required, [field_link_value]).
If you select the filefield under FIELDS in views you can say, "output this field as link" and chose [field_link_value]. If [field_link_value] is empty a link is still wrapped/generated around the image (a href="/sitename/%20").
Comment #14
gomes.mr commentedHi,
i have the same problem related above. May I insert a if condition in a rewrite output field?
thanks
Comment #15
mark trappReopen a new issue: this was fixed a long time ago.
Comment #16
Anonymous (not verified) commentedHi
Perhaps following description may help you out. You can use custome filed as PHP and you can write your desired code in php, the value would get displayed.