Hello, all,
I have a website with several content types as profiles: Personal information, Administrative information, etc. I have built a Views wich shows me the links for all these contents:
user 1 | link to user 1 profile's page X | link to user 1 profile's page Y | link to user 1 profile's page X
user 2 | link to user 2 profile's page X | link to user 2 profile's page Y | link to user 2 profile's page X
user 3 | link to user 3 profile's page X | link to user 3 profile's page Y | link to user 3 profile's page X
I have done this through stabilising relationships with the content profiles. Everything is working fine until now. My problem is that I did not want any link to appear if the content profile is not filled. And this is not happening: if the content profile is not filled, the views still shows a link to a generic page.
I have tried Ommit if empty and also showing something else, but it seems the View does not think the field is empty at all.
Any idea of how I could make the view to differentiate if the profile has been filled or not?
Thank you in advance,
Dani
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | view_export.txt | 39.6 KB | danimatielo |
Comments
Comment #1
dawehnerIf you export the view it's easier to understand what you did :)
Comment #2
danimatielo commentedDarn :( And here I thought I had explained it so well... Hehehe.
I've attached the exported code. It looks like a lot of things, but maybe my explanation above might help you to understand the problem.
To make it short: how can I hide the fields if the user doesn't have a certain content profile?
Thank you again.
Comment #3
dawehnerDid you tryed to check both the hide if empty and empty as zero checkbox?
In the export there is both checkend and unchecked values.
Comment #4
dawehnerAlternative you could try out to check "require relationship" in each relationship.
Comment #5
danimatielo commentedHello,
thank you for your feedback. I have tried both your sugestions:
1) I have checked both hide if empty and empty as zero checkboxes with no results. Since the field is a link to the profile content, when there is no associated content it only provides a link to http://example.com/node/. A correct link would be http://example.com/documentation/2304. But it never considers the field as empty, because it seems there is always a link to fill it.
2) I have checked the box Require this relationship. It partially works, because it actually filter the contents. So, the view only shows those users who have that certain content profile. My problem is that I want it to show all the users, but give me some kind of message if the users doesn't have that certain profile.
Thank you once again,
Dani
Comment #6
danimatielo commentedHello! I have solved this problem doing the following: instead of adding the field "link to the content" in the view, I added a field of that certain content.
For example, I have a picture field in one of the contents, so I added it to the view.
Then I changed the output of the field in the table to the text I wanted and then linked it to the node. In the cases where the field was not filled, and thus the content hadn't been created, it returned an empty value.
It was good to have someone to talk about it, it helped me to find a solution, so, thank you. ;)