[support] Content type with multiple date fields, and the calendar module

Ted ted-drupalists at webfirst.com
Mon May 7 16:04:43 UTC 2012


On 5/7/2012 8:23 AM, Joel Willers wrote:
> I think you can create a Calendar View in Views to do that.
I think that's what his screenshot shows that he did.
> If that doesn't work, you could always make the content types, Starting Date, Event Date, End Date, and then use Node Reference to link them together.
This seems reasonable, but it may be more awkward to create all those 
pieces of content.

Patrick, if you can write a little PHP, you can overwrite a template 
file and hide any date field that doesn't match the current date. Look 
for a link on the views edit page for Theme Information (might be 
different depending on which versions you're using). You can read about 
how to do it at http://drupal.org/node/457740 (look for "Overriding a 
theme file").

Ted

> -----Original Message-----
> From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On Behalf Of Patrick Avella
> Sent: Sunday, May 06, 2012 4:39 PM
> To: support at drupal.org
> Subject: [support] Content type with multiple date fields, and the calendar module
>
> I have a content type that has many dates, for example:
> Start date
> Do something date
> End date
>
> This is not a time span, they are three individual events all related to eachother, all members of the same content type.
>
> I would very much like to be able to display a calendar with something like:
> [Node title] [Label of date that matched]
>
> In a calendar, but what happens is, the calendar shows ALL of the fields regardless if they are matched or not.
>
> Example.
> Start date may2
> Do something date may 5
> End date may 7
>
> What happens now, on the 2nd 5th and 7th they all say something like [node title] [start date] [do something date] [end date]
>
> But I only want it to show JUST the field that matched.
>
> To put it another way, I need to display fields on the calendar, not nodes.
>
> Is this possible, are there any recommendations that don't involve me rolling my own code? I have a screenshot if it helps anyone to
> understand: http://drupal.org/files/Screenshot_59.png
>
> Thanks,
> Patrick
> --
> [ Drupal support list | http://lists.drupal.org/ ]



More information about the support mailing list