Hallo,
I have looked somewhat, but I didn't find a solution to my question, so I decided to post it.
I'm trying to do the following:
I have a view with different fields. The point now, is that I want to display or hide this fields depending on different conditions, such as: 1) is the user author of the node, 2) is the node status published or not, 3) depending on user role, 4) etc. These should now be connected, e.g.: a) is node published or not > YES > than : check : is user also author? > YES > than show field A and do not show field B. and so on.
A part of these conditions can be controlled by some existing modules, but as I see it, not the combination of the different conditions. As I understand it, it would be best to create a field with php code which checks all these conditions, but here comes my problem: I do not know any php and less the (background) architecture of Drupal.
Can someone show me examples of such conditional php codes, which control the output of fields. Are there 'tutorials' concerning this functionality?
OR are there indeed modules with such a function? I did not find anything!
Well, I hope this post is read by someone ;-)
Thanks for any help in advanced
Cheers
Pat
Comments
Comment #1
ykyuen commentedHi Patrick,
See if the following post could help.
Drupal 7 – Add PHP field to view
Kit
Comment #2
Patribus commentedHi!
Yes, I saw your post this morning (by newsletter).
In fact I did manage to do what you're explaining with your post yesterday. I learned the php essentials and managed to do what I wanted. I was thinking about creating a screencast, but you were quicker with you're post. :-)
Thank you for your help. And good work with your blogging!
Cheers
Pat
Comment #3
jkingsnorth commentedThis issue was fixed, closing.