Solved

Conditional filed in Drupal views

Posted on 2011-09-14
3
245 Views
Last Modified: 2012-05-12
In a view, the output for a field is rewritten as follows:
<div class="company-profile-title">Contact Person:</div>
<div class="company-profile-data">[field_up_oi2_contact_name_value]</div>

Open in new window


I need to make it so that if [field_up_oi2_contact_name_value] is empty, then [field_up_oi1_ceo_name_value] is displayed instead.

How can I achieve that?
0
Comment
Question by:jiiins2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
h4hardy earned 500 total points
ID: 36540915
0
 

Author Comment

by:jiiins2
ID: 36541065
Thanks, I just found "conditional fields" and it works just nice. My problem now is that the view doesn't have all the fields I need, i.e. $data missing something. Do you know by chance how to modify the query that populates $data?
0
 

Author Comment

by:jiiins2
ID: 36541281
Never mind, I got it.
0

Featured Post

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we will look at our content management system as a whole, to get an idea of how we will start to manage these content items.
This article will shed light on the latest trends when it comes to your resume building needs. For far too long, the traditional CV format has monopolized the recruitment market.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question