Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sujanshresthanet/drupal-custom-blocks
Provides examples demonstrating the implementation of Drupal 9/10 custom blocks.
https://github.com/sujanshresthanet/drupal-custom-blocks
drupal drupal-10 drupal-10-module drupal-9 drupal-9-module drupal-module
Last synced: 1 day ago
JSON representation
Provides examples demonstrating the implementation of Drupal 9/10 custom blocks.
- Host: GitHub
- URL: https://github.com/sujanshresthanet/drupal-custom-blocks
- Owner: sujanshresthanet
- Created: 2024-04-07T16:17:22.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-04-09T03:53:49.000Z (7 months ago)
- Last Synced: 2024-10-12T01:21:58.832Z (28 days ago)
- Topics: drupal, drupal-10, drupal-10-module, drupal-9, drupal-9-module, drupal-module
- Language: PHP
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Drupal 9/10 Custom Blocks
This module provides various examples of custom blocks in Drupal 9/10 and demonstrations related to creating custom blocks. Custom blocks are a powerful feature in Drupal that allows developers to create reusable pieces of content or functionality that can be placed within regions of a site's layout. With a variety of examples covering different scenarios and implementations, this module aims to empower developers to create powerful and flexible block-based solutions for their Drupal projects.
## Features
- **Basic Custom Block:** Learn how to create a simple custom block programmatically.
- **Configuration Form Block:** Explore creating custom blocks with configuration forms to allow users to customize block content.
- **Block Plugins:** Understand the concept of block plugins and how to create reusable block components.
- **Dynamic Block Content:** Implement blocks with dynamic content based on various factors like user roles, permissions, or other contextual information.
- **Custom Block Templates:** Customize the display of blocks by using custom block templates.
- **Access Control:** Learn how to manage access control for custom blocks based on user roles or permissions.
- **Block Visibility Settings:** Explore different ways to configure block visibility settings to control where and when blocks appear.
- **Integration with other Modules:** See examples of integrating custom blocks with other Drupal modules, such as Views or Paragraphs.
- **REST API Integration:** Understand how to expose custom block content through Drupal's REST API.## Installation
1. Clone this repository into your Drupal `modules/custom` directory:
2. Enable the "Custom Blocks" module either via the Drupal admin interface or using Drush:
3. Navigate to `admin/modules` and ensure that the module is enabled.
## Usage
1. Navigate to the Drupal admin interface and go to `Structure > Block layout`.
2. Click on the "Custom blocks" tab to view and manage your custom blocks.
3. Use the examples provided in this module to create, edit, and manage custom blocks as needed.## Contributing
Contributions are welcome! If you have any improvements, bug fixes, or new features and examples to add, feel free to open a pull request.
## License
This project is licensed under the [GNU General Public License v2.0](LICENSE).