Problem/Motivation

This module is fantastic as a robust, flexible solution for adding content types to a site. Often, however, sites would also benefit from a way to also create related views. For example, when adding events to a site, a site builder would often to list upcoming and past events separately sorted by start date, and potentially also have a calendar view of events (most useful for administrators).

The Smart Date module currently provides the Smart Date Starter Kit, most of which could be provided through Schema.org Blueprints, with the exception of a default view with two displays. There is also the Smart Date Calendar Kit which provides a view for a calendar display, including drag-and-drop functionality for managing events. These modules provide rigidly-defined views because they only allow for a specific content type (Event) and expect a particular field for the date values (field_when).

Proposed resolution

Give this module the ability to also spin up related views, using the naming being provided during creation of the content type.

The current Smart Date module could be deprecated in favor of something more flexible based on this module.

Ideally, such a solution could also be compatible with the Drupal community's Recipes initiative.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

mandclu created an issue. See original summary.

jrockowitz’s picture

#3351355: Allow modules to specify Schema.org types that need to exist before a module installed would make it possible for a starter kit to define the required Schema.org types and mappings that need to be set up preinstallation.

jrockowitz’s picture

With #3351355: Allow modules to specify Schema.org types that need to exist before a module installed, I think the Smart Date Starter Kit need to remove the Event content type, add a smart_date_starter_kit.schemadotorg.yml, and tweak the Events view to use the Schema.org Blueprints fields.

jrockowitz’s picture

Here is a Schema.org Blueprints Smart Date Events sandbox module which needs to installed with the code from #3351355: Allow modules to specify Schema.org types that need to exist before a module installed.

The Schema.org Blueprints Smart Date Events sandbox module has a copy of smart_date_starter_kit/config/install/views.view.events.yml with field_when changed to schema_event_schedule

All the below configuration related to the Event content type was deleted.

  • core.entity_form_display.node.event.default.yml
  • core.entity_view_display.node.event.default.yml
  • core.entity_view_display.node.event.teaser.yml
  • field.field.node.event.body.yml
  • field.field.node.event.field_when.yml
  • field.storage.node.field_when.yml
  • node.type.event.yml
  • core.entity_view_mode.node.teaser.yml
  • field.storage.node.body.yml
jrockowitz’s picture

Status: Active » Closed (outdated)