Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Mar 2009 at 18:52 UTC
Updated:
2 Dec 2009 at 05:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
dawehnerthere are definitve some use cases, but you have to write it different for each kind of string,
there could be empty, 0, etc.
this has to be implemented in views_handler_field.inc and be overwritten in other filters
Comment #2
merlinofchaos commentedI would be open to a patch that does this, as it is a common use case and right now can only be accomplished via theming.
Comment #3
dawehnerthere is a patch but i cannot find the patch anymore :(
The patch added a option to every field
Comment #4
dawehneri think i was wrong, i searched the issue queue, but couldn't find it.
here is a first patch, which alters the ->render function.
The problem with this is that, every ->render function has to be altered, there should be a better way to do it.
Comment #5
dawehnerneeds review...
Comment #6
dawehnermove this to dev
Comment #7
dawehnermove it to work, its horrible, there should be somehing in preprocess function if i understood/remember merlin correct
Comment #8
design.er commentedSubscribe. I've posted this issue: #401154: How to check if a view field is empty?
I'd like to help testing and hope we'll get a working version soon.
Regards,
Stefan
Comment #9
design.er commentedAny news?
Comment #10
phillipadsmith commentedSubscribing.
Comment #11
valderama commentedsubscribing
Comment #12
deg commentedSubscribing
Comment #13
merlinofchaos commentedViews 2.6 introduced a feature like this.
Comment #14
valderama commentedthx merlin!
it would help if you give a hint, where to find this feature. obviously some of us don't find it.
if i see it correctly, the style plugin inserts a zero for empty values? meaning that each style-plugin would need to define how empty values are handled? or am i completely wrong?
best regards,
walter
Comment #15
merlinofchaos commentedThere's an option on every field for what to show if the field is empty, and a checkbox for whether or not to consider the numeric value of 0 as empty.
Comment #16
valderama commentedthis was introduced in views 2.7 !! not in views 2.6.
therefor i could not find it.
Comment #17
merlinofchaos commentedD'oh! You are right about that. Sorry! Yes, in 2.7. I guess I can't read my own release notes. =)