User account menu

  • Log in

Breadcrumb

  • Home
  • Module Structure
Home
DrupalVIP
Freelancer service with great care and enthusiasm.

Main navigation

  • Home
  • Products
  • Blog
  • Support

Module Structure

Module Structure

Displaying 1 - 2 of 2

Custom Block: Create fast and simple

Blocks are individual pieces of your site’s web page layout. They are placed inside the regions of your theme, and can be created, removed, and rearranged in the Block layout (admin/structure/block) administration page.

Examples of blocks include the Who’s online listing, the main navigation menu, and the breadcrumb trail. The main page content is also a block.

Module Development
Custom Block
Code Example
Plugin
back-end
Module Structure
BlockBase
@Block
Code Snippet
Drupal 10
Code Snippet
<?php

namespace Drupal\basic_module\Plugin\Block;

use Drupal\Core\Block\BlockBase;

/**
 * Block annotation
 * 
 * @Block(
 *      id = "basic_block",
 *      admin_label = @Translation("Basic Block"),
 * )
 */
class BasicBlock extends BlockBase {
   /**
     * {@inheritDoc}
     */
    public function build() {
        $markup = '';
        $markup .= '<div>';
        $markup .= '    <p>Anything can come here: code, variables, html, etc.  </p>' ;
        $markup .= '</div>';
        return [
            '#type' => 'markup',
            '#markup' => $markup,
        ];
    }    
    
} // end of class

Drupal 8 - Directory Structure

Whenever someone starts learning how to build sites with a new content management system, the first questions often involve how things are put together. For example, where do I put modules? Where are the theme files? What can I modify and what should I leave alone?

Drupal 8
Drupal
Module Development
Module Structure
Subscribe to Module Structure

The Freelancer Assistance

Fullstack Service

Fullstack Service

Proactive Maintenance

Proactive Maintenance

Drupal Shared Space

Drupal Shared Space

Drupal Development

Drupal Development

Drupal Training

drupal training session

Site Management

Site Management
Review All Services

Buy Hourly Support

 

Drupal platform support for complex websites. The service includes support, training, troubleshooting, fixes, updates, tool creation and module building.
* Minimum order is for 5 hours of support
* For every 20 hours of order you will be entitled to an additional hour of support
* For every 50 hours of order you will be entitled to 5 additional hours of support

 

>> Payment <<

 
cards

מופעל על-ידי paypal

Legal

  • Home
  • Contact
  • Products

Copyright © 2026 DrupalVIP - All rights reserved

Developed & Designed by Yuval Ben-Hur