Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
Running Drupal 10.5. Is it possible to use drush to automate creating block content, saving in the database, assign it to a region and have it displayed?
I have found information how to create new modules on line but being a newbie this seems to be different from creating content, store it in the database, assign it to a region block to have it displayed, all using drush.
I created a new types of content (import) to which it imports data from CSV files.
This node contains the field (field_result) in which the value is stored.
I added views that displays all nodes in the form of a table.
I want to add programmatically three rows to the view: sum, average and min
I have nodes with puzzles. I store extra info on the puzzle (say puzzle_sol) in a different table. I add this extra info to node in 'hook_node_storage_load' in my module. I then attach a special library to the page in page_attachments hook. There I use the above extra info to decide whether to attach the library or not. (if puzzle_sol was added, then attach the library ... else not)
This whole strategy is working without absolutely any issue.