Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By wheretoplaygames on
Every example i see for creating custom modules makes a simple "Hello world". How do i create a more complex php custom block?
I'm tyring to replicate a scrolling calendar that i have working in Drupal 7.
Lots of php code, some javascript. Any examples ?
Thank you
Comments
examples galore ...
Pretty much any and every available D8 module can serve as a model for what you want to do.
D8 module development involves creating a lot of metadata plumbing that defined "routing" and "namespacing", in addition to the primary functionality of the module implements.
(D8 modules that include javascript usage)
https://www.drupal.org/project/asset_injector
https://www.drupal.org/project/ajax_links_api
(examples for developers)
https://www.drupal.org/project/examples
drupal.org - 8.x module search results
There are also plenty of youtube videos that walk through building a variety of types of D8 modules, beyond "hello world" to more complex functionality.
spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...