Trying to hide CCK filed in Drupal Views Output based on date criteria?

Assuming your view uses a Row style of "Fields", my first thought would be to check the "Exclude from display" option for the image field, then add it back in at the theme layer, by overriding one of the views templates (see Theme: Information on the Views "Edit" page) There may be a better way though.

Assuming your view uses a Row style of "Fields", my first thought would be to check the "Exclude from display" option for the image field, then add it back in at the theme layer, by overriding one of the views templates (see Theme: Information on the Views "Edit" page). There may be a better way though.

Unfortunately, the row style is node, which is causing the issue. The ability to link through to a full node and then print the node is very important. I think the answer is a simple PHP script that I place in my node.

Tpl file that says, display all content and if the To Date is >= today, then display the image, otherwise, leave the image out. – Jason Feb 1 at 1:32 In that case, you could set the node display to show the teaser version of the node, then add the logic inside the node.tpl. Php template, to check the Display To Date if $teaser is TRUE.

– Matt V. Feb 1 at 1:46 that's exactly what I can't figure out. Can you help with the logic?

I haven't done any php coding before and have tried for hours to figure out the logic. – Jason Feb 1 at 1:53 1 in almost all cases using fields instead of node for display in views is preferable, since it's generally much faster. – mirzu Feb 1 at 18:44 mirzu, I tried using fields, but can't figure out how to hide just one field.

I need to hide the field if the To date is less than today and I don't see a way to add criteria. The field contains a default image and the users that create the content are not allowed to upload a new image. So the issue I have is that I want to hide the individual field if the To date is less than today, but I do not want to hide the whole node.Is there some kind of IF statement I can put in the node.tpl.

Php file? Thanks! – Jason Feb 17 at 1:02.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions