How to use the API for custom content type ("Show in event calendar" set to "never")?

stodge - July 1, 2009 - 00:37
Project:Event
Version:6.x-2.x-dev
Component:API
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I have a custom content type that I want to hook up with start and end dates. But I want more control over how the form and dates are rendered on the node page. If I set "Show in event calendar" to "never" for my custom content type, can I use the API to display the form? I can manually render the dates in my template.

Thanks

#1

killes@www.drop.org - July 2, 2009 - 08:57

I doubt that will work.

What kind of layout do you want for the date selectors?

#2

stodge - July 2, 2009 - 11:39

I'm not sure - I would prefer an API so I can control the rendering of the widgets on the form and the data when viewing my node. The idea of "one size fits all" is great but I'm the exception. :)

#3

killes@www.drop.org - July 2, 2009 - 16:34

I think you probably want to use the date module. It has the flexibility that event does deliberately not offer.

#4

stodge - July 3, 2009 - 11:54

One thing I want to do is programmatically set whether an event for a given content type has times or an end date. Rather than force the user to make extra mouse clicks. So, I have a content type "Milestone" that doesn't require and end date or time. I want my module to disable the end date and times instead of expecting the user to do it.

Thanks

#5

killes@www.drop.org - July 3, 2009 - 12:15

You can do this through hook_form_alter, I think.

#6

stodge - July 3, 2009 - 12:16

Ah good point. Thanks.

#7

killes@www.drop.org - July 4, 2009 - 11:02

Can we mark this fixed, then?

 
 

Drupal is a registered trademark of Dries Buytaert.