w2lame
w2lame

Reputation: 2813

Drupal cck and views

I have added a new content type event. Now, i have to make a view in which it shows a set of fields if the dateOfEvent (one of the fields) is less than the present date and some other set of fields of the 'event' content if the dateOfEvent is more than the present date. how can I do that in the views..

thanks in advance for helping...

Upvotes: 0

Views: 212

Answers (3)

sprugman
sprugman

Reputation: 19831

Hmm... I think I'd do this in the theming layer. So in views, you would make all fields available, and then in the theme, you'd hide one set or the other depending on the date value. Whether to do it with views theming, or in the node_type.tpl.php file depends on how else you're using the cck types.

Upvotes: 1

Kevin
Kevin

Reputation: 13226

Are you using the Date module? It will add a bevy of new views options and make CCK date field easier to use in this manner describing exactly what you asked.

Upvotes: 1

alxp
alxp

Reputation: 6311

Following this guide should get you where you're going: Step by Step Setup of Calendar View

Upvotes: 1

Related Questions