umd / umd_terp_base
UMD Terp Base is the base module for all UMD drupal 8 projects.
Installs: 59
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 5
Language:Twig
Type:drupal-module
Requires
- drupal/admin_toolbar: *
- drupal/external_data_source: *
- drupal/field_group: *
- drupal/link_attributes: *
- drupal/metatag: *
- drupal/paragraphs: *
- drupal/pathauto: *
- drupal/search_api: *
- drupal/tablefield: *
- drupal/viewsreference: ^2.0@beta
- drupal/webform: ^6.2@beta
- dev-master
- 10.0.1
- 10.0
- 8.1.x-dev
- 8.1.72-alpha
- 8.1.71
- 8.1.70
- 8.1.69
- 8.1.68
- 8.1.67
- 8.1.66
- 8.1.65
- 8.1.64
- 8.1.63
- 8.1.62
- 8.1.61
- 8.1.60
- 8.1.59
- 8.1.58
- 8.1.57
- 8.1.56
- 8.1.55
- 8.1.54
- 8.1.53
- 8.1.52
- 8.1.51
- 8.1.50
- 8.1.49
- 8.1.48
- 8.1.47
- 8.1.46
- 8.1.45
- 8.1.44
- 8.1.43
- 8.1.42
- 8.1.41
- 8.1.40
- 8.1.39
- 8.1.38
- 8.1.37
- 8.1.36
- 8.1.35
- 8.1.34
- 8.1.33
- 8.1.32
- 8.1.31
- 8.1.30
- 8.1.29
- 8.1.28
- 8.1.27
- 8.1.26
- 8.1.25
- 8.1.24
- 8.1.23
- 8.1.22
- 8.1.21
- 8.1.20
- 8.1.19
- 8.1.18
- 8.1.17
- 8.1.16
- 8.1.15
- 8.1.14
- 8.1.13
- 8.1.12
- 8.1.11
- 8.1.10
- 8.1.9
- 8.1.8
- 8.1.7
- 8.1.6
- 8.1.5
- 8.1.4
- 8.1.3
- 8.1.2
- 8.1.1
- 8.1.0
- dev-preflight
- dev-develop
- dev-feature/ut_news_api_endpoint
- dev-feature/configuration
This package is auto-updated.
Last update: 2024-11-06 15:30:33 UTC
README
UMD Terp Base is the base module for all UMD drupal 8 projects. It is designed to be installed along with the UMD Terp Theme. This module provides a suite of modules, functions, and configuration to make that theme work as designed.
Installation
Install as you normally would any drupal 8 module.
Via Composer:
composer require umd_digital/umd_terp_base --prefer-dist
drush en umd_terp_base
or enable via admin UI- Enable all desired sub modules
Manually
- Download this repo into /modules/contrib/umd_terp_base
drush en umd_terp_base
or enable via admin UI- Enable all desired sub modules
Configuration
- No configuration needed.
Sub Modules
- umd_terp_content_types: Provides various customizations and configurations for content types used in the "UMD Terp" theme. This is installed by default when enabling umd_terp_base.
- ut_accordion: Paragraphs integration of accordions for UMD projects. This module provides a way to add an accordion to Kitchen Sink Pages.
- ut_blockquote: Paragraphs integration of blockquote for UMD projects. This module provides a way to add a blockquote to Kitchen Sink Pages.
- ut_button: Paragraphs integration of buttons and links for UMD projects. This module provides a way to add buttons to Kitchen Sink Pages.
- ut_card: Paragraphs integration of cards for UMD projects. This module provides a way to add a cards to Kitchen Sink Pages.
- ut_carousel: Paragraphs integration of a carousel for UMD projects. This module provides a way to add a carousel to Kitchen Sink Pages.
- ut_divider: Paragraphs integration of a Horizontal Rule for UMD projects. This module provides a way to add a Horizontal Rule to Kitchen Sink Pages.
- ut_events: Paragraphs integration of an Events Feed (from calendar.umd.edu) for UMD projects. Essentially, this module pulls a feed of upcoming events from hub.umd.edu, with optional filter paramaters available, in order to highlight relevant events.
- ut_feature: Paragraphs integration of features for UMD projects. This module provides a way to add a feature to Kitchen Sink Pages.
- ut_images: Paragraphs integration of images for UMD projects. This module provides a way to add a images to Kitchen Sink Pages.
- ut_news: Paragraphs integration of a News Feed (from today.umd.edu) for UMD projects. Essentially, this module pulls a feed of articles from today.umd.edu, with optional filter paramaters available, in order to highlight relevant articles.
- ut_people: Paragraphs integration of people for UMD projects. This module provides a way to add a list of Content Type People to Kitchen Sink Pages.
- ut_sidebar_menu: This module provides a customized sidebar menu, for use in the UMD Terp theme.
- ut_slideshow: Paragraphs integration of a slideshow for UMD projects. This module provides a way to add a slideshow to Kitchen Sink Pages.
- ut_stats: Paragraphs integration of statistics for UMD projects. This module provides a way to add statistics to Kitchen Sink Pages.
- ut_table: Paragraphs integration of a tablefield for UMD projects. This module provides a way to add a a table to Kitchen Sink Pages.
- ut_tabs: Paragraphs integration of tabs for UMD projects. This module provides a way to add an tabs to Kitchen Sink Pages.
- ut_text: Paragraphs integration of HTML/Text widgets for UMD projects. This module provides a way to add HTML/Text to Kitchen Sink Pages.
- ut_video: Paragraphs integration of a video for UMD projects. This module provides a way to add a a video to Kitchen Sink Pages.
- ut_view: Paragraphs integration of a view for UMD projects. This module provides a way to add a view to Kitchen Sink Pages.
- ut_webform: Paragraphs integration of a webform for UMD projects. This module provides a way to add a webform to Kitchen Sink Pages.
- ut_news_and_events_columns: Paragraphs integration of a two column feature for UMD projects. This module provides a way to add a two column Local Articles and Events layout to Kitchen Sink Pages.
Development
Versioning
Semantic tagging must take place in github for the updates to be able to be pulled via composer. When ready to deploy, create a tag in github up one version from previous, with the starting version being 8.1.0:
- Minor versions (non breaking changes): 8.1.1, 8.1.2, etc.
- Major versions (breaking changes): 8.2.0, 8.3.0, etc.
Core (base) module issues, patches, etc
All edits, requests, etc should be submitted to the github repo for the UMD Terp Base Module. Please add issues to the issues queue. Patches will be reviewed on a merit and resources available basis.
Frontend
All CSS, JS, etc are based in the UMD Terp Theme. This module contains no frontend styles for any widgets/etc.
Customization
- THIS MODULE SHOULD NEVER BE MODIFIED DIRECTLY.
- All customizations should go into a custom module.
All Configuration for each module is created on install. Technically, you can modify these, though we do not reccomend it. Any future updates for modules will come with a hook to re-install config for that module, so better to leave any existing module config as is. Changes to existing configuration are better done via form_alter hooks, leaving default config in place.
Nodes
Use hook_form_alter()
. For example, to remove the "Hide sidebar" boolean from themes that do not need it, in YOUR_CUSTOM_MODULE do the following:
function YOUR_CUSTOM_MODULE_form_alter(&$form, FormStateInterface $form_state, $form_id) { // Hide the sidebar boolean. if ($form_id == 'node_umd_terp_basic_page_form' || $form_id = 'node_umd_terp_basic_page_edit_form') { if ( isset($form['field_umdt_ct_hide_sidebar'])) { $form['field_umdt_ct_hide_sidebar']['#access'] = FALSE; } } }
Paragraphs
Use hook_field_WIDGET_TYPE_paragraphs_form_alter()
. For example, to remove the "style (light or dark) from a theme that does not need/want it, in YOUR_CUSTOM_MODULE do the following:
function YOUR_CUSTOM_MODULE_field_widget_paragraphs_form_alter(&$element, &$form_state, $context) { // Remove light/dark choice from UT Blockquote. if ($element['#paragraph_type'] == 'ut_blockquote') { if (isset($element['subform']['field_ut_blockquote_style'])) { $element['subform']['field_ut_blockquote_style']['#access'] = FALSE; } } }
Markup/Hook Overrides
- You may override paragraphs templates by copying them into the sub-theme theme folder.
- You may override hooks by copying into sub-theme .theme, or custom module .module and modifying hook name/etc.