Modifying OpenCulturas views displays

What to consider beforehand

Publication date

Assuming that you have some experience with Drupal Views and know how to change a given view in broad strokes. In case you don't know anything about this: the good news is that in principle those views can look or be structured differently. Any Drupal service provider can do that for you.

The OpenCulturas update strategy

Unlike in the typical Drupal project, when you update OpenCulturas to a newer version, changes might be made to the views that were originally delivered (tagged with "OpenCulturas").

This is intended. OC follows a "product" idea: Site owners are invited to become stakeholders for product decisions by joining the OpenCulturas Association. Views have been and will be enhanced. News features bring new filter options that will be added to given views. Thereby the early funders benefit from later developments.

What if you want to change a view?

Say, you want the Calendar and the corresponding map on different pages. Obviously you would not be delighted if this was reset by an update.

We recommend the following:

  1. Copy a given view (the view, not the single display inside a view) and prefix the title and machine name with your project specific name
  2. Edit the view description, replace "OpenCulturas" (tag and description) with your project-specific name - or add it. This helps identifying the modified views on the long run.
  3. Delete any display in your copied view that you do not intend to change. In the given scenario, to separate Upcoming dates and the map you keep just those two displays.
  4. Now you can modify your new view.
  5. Replace the OC default view display with your view: In the given scenario, edit the "Calendar" page, edit the View content element and pick your new display (now you are happy that you have changed the default name).

Keep in mind that it might become quite some work to replace e. g. all instances of calendar views. In case you have changed the markup of all date entries it is required to go through the viewfields in almost any content type and some taxonomy term displays and change the default value.

If you want to offer your modified view to editors, go to the "View" paragraph and change the allowed values.

Read the release notes

With every feature release we publish release notes on Drupal.org (of course) along with an elaborate version on this website. Please read them to get an idea what enhancements we might have made related to views. You might want to copy those enhancements to your custom view.

 

 

Author

Meike Jung

Concepter