Addtocal just outlook link

Created on 4 June 2025, about 2 months ago

Problem/Motivation
Currently, the module always displays an "Add to Calendar" button with a dropdown containing all available calendar types (Google, Yahoo, iCal, Outlook, etc.).
There is no configuration option to limit or customize which calendar types are shown.
Some use cases require only a specific calendar type (e.g., iCal/MS Outlook) and may prefer to display just a direct link instead of a button and dropdown.

Steps to reproduce
Enable and configure the module.
View the rendered "Add to Calendar" button on a page.
Observe that all calendar types are always shown in the dropdown, with no way to limit or customize the list.

Proposed resolution
Add a configuration option (e.g., in the field display settings or module configuration) to allow site builders to select which calendar types should be available.
If only one calendar type is selected, render a direct link instead of a button and dropdown.
Maintain backward compatibility by defaulting to all calendar types if no configuration is set.

Remaining tasks
Add configuration UI for selecting allowed calendar types.
Update preprocess and template logic to respect the configuration.
Add logic to render a direct link if only one calendar type is enabled.
Update documentation and help text.
Add/update tests as needed.

User interface changes
New configuration options for selecting which calendar types to display.
If only one type is enabled, the UI will show a single link instead of a button and dropdown.

API changes
None expected, unless exposing new configuration options via API.

Data model changes
None expected, unless storing new configuration in config entities or field settings.

Currently, i have temporarily created a patch to overwrite the proprocess and twig file.

Feature request
Status

Needs review

Version

3.0

Component

Code

Created by

🇮🇳India scvinodkumar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024