Hide row in view if any field is empty - drupal

I have a Drupal 7 view that uses fields as display type.
There are three fields, and I don't want to show the row if any one field is empty.
Currently, I am adding a filter for each of the three fields to achieve this. meaning if I have 20 fields, I would have to go for 20 filters.
Is there an easier way of doing this?
P.S. I can do this by overriding the row style output template file, and then add some custom php code. But I want to know is there an easier way using the views administration interface.

When you select 'Fields' under 'Show' in View, in 'settings' you can check "Hide empty fields" option.
Cheers!!!

You can put a condition on view filter. If image field is empty then row will not display.

Related

How can I search multiple value fields in a view?

I'm fairly new to Drupal, but not to CMSs or PHP, so if I need to do this in code I will. It just seems it should already be possible with Views.
So, I'm making a view, and I want a 'combine fields' search filter for all fields. I can add my normal fields, but I don't seem to be able to add any field with "Display all values in the same row" checked under 'MULTIPLE FIELD SETTINGS'. This column simply does not show up in the options for the combine fields filter.
Any ideas? Might this be a solved problem? I can't be the only one...
Cheers,
J.R.

Display content-type fields in two column table format?

I have a content-type with 5 field. how can I display these field in two column table format in Drupal 7? Create node--content-type.tpl.php and theme it or is there any simpler way to do it?
Try field_group_table module. Once you enable it, you can visit the 'view mode' you want to change and create a 'field group'. Add all the fields you want show as table into this 'field group'. Now set the group to us field_group_table. This must get your job done.
You can create new view mode for node or tpl.php file(as you wrote) or write some preprocess function.
Also you can create view which will show all node field and put it to the page(not good solution).
But what you really need it is Panels module - you can create every layout you want with panels.

How to filer what is shown in my view according to the content of one of the content fields?

I would like to know how to filter view (block) according to content of one of my fields in that view.
E.g. I have added to my block view a field called Car description, which contains a text with something like "This car is convertible and the best on the market." etc.
Now, I want in filers section set up a condition to show just that content which contains in the field Car description a word convertible.
I was wondering that if this is not possible, I can maybe create a custom field which will contain a PHP code with condition if else, so the result of this custom field could be 0 or 1 and then the filter could check it better.
However, I think that filter is applied before any of the fields are populated, but maybe I am wrong.
How to solve this problem? Did anyone dealt with similar situation?
Thanks in advance for your advice.
You should use views filters.
In filter settings you can specify properties of that filter. For example you can check field for containing word 'convertible'.
However for your case I would use taxonomy. 'Convertible' word is a good candidate for taxonomy term.

create custom menu in views based on drupal node's cck field

I have a series of committees each one has multiple types of content ex: home page, members page, links page along with a cck field with the name I would like to create a menu block in views for each committees pages based on the value of the name in the cck field and print the only one block to all the pages. is their a way to use tokens in views to accomplish this or a separate module that will accomplish this.
The easiest way may be to just create a block view that displays an li list of the cck field for each committee. You can then style this like your menu.
I found a way to do it after continuing to look using views arguments and default php argument i created an if elseif statement for each committee.

DRUPAL: adding CCK image fields to other CCK fields

can I add a CCK image field to another CCK field ? I would like to add icons for each item i add. At the moment I can only write the description.
This would be very cool functionality!
You could do this with JQuery if you want to add an icon by file type. For example see http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/ tip #10.
If you want to be able to specify an icon per item added (so it could be a different icon for every added item) then how you do it depends on how you are displaying it.
So lets say each CCK field is being added to a particular node type and you have a view that lists those nodes then I'd recommend adding a CCK image field to the node (so that each node of the required type has the descriptively named CCK image field and the original CCK field) and then adding a custom template to the view that controls how the image and field are output relative to each other.
I was about to write an example of how to do that but thought I'd check if that describes your needs before I add unnecessary info to the response.... can you clarify what you're trying to do?
You can do this using CCK 3.0's multigroup functionality. Note that there is no stable release for this branch, but it seems to work fine for most use cases.
You would add an image field (icon) and a text field, into a multigroup, and then when adding a new node, instead of the traditional 'add another' button, there is a button to add another group of associated fields.

Resources