开发者

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

I am trying to conditionally hide a field on my site that links through to a Drupal node. I want the image to be hidden the Display To Date (custom CCK field) is in the past. The field name is coupon_link and it should only show if the Display To Date is >= today. Here is a link to the output so you can get a better idea (http://www.zambux.com/coupons?field_location_value_many_to_one[]=Lake+Oconee&field_location_value_many_to_one[]=Athens). The image tha开发者_Python百科t says "View Our Coupon" should not display if the To date is < today as the coupon would technically be invalid and should not be linked to.

Thank you!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜