Here's the use-case:

I need to display the date on a node as a regular date and also show the "Add to Calendar" button associated with that date, but in two, completely distinct places on the page.

There are plenty of ways to do this; in my particular case, I've decided to forego configuration of the date field to display using addtocal's widget, and instead programmatically create an extra field that renders the addtocal button based on that field's date value.

The trouble is that even though it renders fine, the addtocal.ics callback URL isn't active because it only creates menu items for those that are configured to use the widget.

I don't see any harm in getting rid of that condition in addtocal_menu().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

iamEAP’s picture

Status: Active » Needs review
FileSize
666 bytes

Simple patch for review.

Anonymous’s picture

Assigned: Unassigned »
Issue summary: View changes
clfer’s picture

Hello,

We ran into the same issue and I came with the following solution
I suggest to add an admin form that allow to enable addtocal for some entities even if they do not possess a field that explicitly use addtocal_view display.
Thus it allow to use addtocal programmatically like described in the original issue.