Rewrite the output of this field rewrites empty fields
awolfey - April 14, 2009 - 13:34
| Project: | Views |
| Version: | 6.x-2.5 |
| Component: | node data |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I'm rewriting a field output as shown in the attachment. I'm outputting the field as a link using a replacement pattern.
If the field is empty, it is still rewritten and the url is the base domain.
I would like for the field output to be empty if the field is empty.
Perhaps my configuration of the field output is wrong?
Thanks
| Attachment | Size |
|---|---|
| link.jpg | 115.5 KB |

#1
Having 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.
#2
Subscribing to this issue... having the same problem and looking for a solution. Thanks to anyone who can help with this!
#3
Subscribing. I'm having the same problem, and haven't found a clean solution.
#4
I am also looking for a solution. Any help or trick would be welcome.
#5
My 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.
#6
Subscribing
#7
This 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.
#8
Checked in a new system to allow this to happen.
#9
Excellent! Thank you. I needed this again just today.
#10
Automatically closed -- issue fixed for 2 weeks with no activity.
#11
Sorry 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!
#12
It'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...