Drupal 7 views fields

Posted on 2013-10-01
Medium Priority
Last Modified: 2013-10-01
Dear experts,

I was wondering, is there a way to nest fields inside a view?
For example, I have the following fields inside views:

Field 1
Field 2
Field 3
Field 4

So my question is, is it possible to nest Field 2 inside Field 1? like:

Field 1
      Field 2
field 3
Field 4

I would like Field 2 to be inside the div that corresponds to Field 1.

Thanks in advance,

Question by:glepiza
  • 3
  • 2
LVL 13

Accepted Solution

Aaron Feledy earned 1200 total points
ID: 39538714
In your view configuration, go to each field and exclude it from display. Then, add a custom text field to your view. You can then use tokens to add the content from each of your fields and add divs etc to arrange things however you like.

Author Closing Comment

ID: 39538729
you are a genius!!! Thanks!!!!!!! just what I need it.

Author Comment

ID: 39538776
One more thing, I just saw it after doing everything, but if you want I can open a new question. :)
On the view fields I have the following field: Privatemsg: Send Privatemsg link. For some reason I can´t exclude it from display so when I use the token [privatemsg_link] I get two links to send a private message. Do you know if there is way to work around this?

As I said before, if you would like me to open a new question that is fine, but if you can answer me here I would greatly appreciate it.


LVL 13

Expert Comment

by:Aaron Feledy
ID: 39538801
The missing option seems to be a shortfall with the privatemsg module. Check here for a patch. You could also hide the field with CSS, but I would advise against that since it still shows up when viewed by search engines and various other platforms.

Author Comment

ID: 39538803
Excellent! the patch worked like a charm! Thank you very much!

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This article shows how a content item can be identified directly or through translation of a navigation type. It then shows how this information can be used to create a menu for further navigation.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
If you are looking for an automated tool which can generate reports for Outlook emails and other items from PST file, then you can go for Kernel PST Reporter tool. The reports which are created by this tool are helpful to analyze and understand PST …

622 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