01

Custom Blocks

Drupal lets you create dynamic and engaging content experiences through Custom blocks.

  • Custom Blocks: These are reusable content snippets you can place in specific areas of your website's layout, called "regions." Imagine them like pre-built Lego bricks. You can create a block displaying "Latest News" or a "Featured Product" carousel. These blocks are easy to manage and can be reused across different pages.

    Creating a custom block.

  • Access Block Layout: Navigate to Structure -> Block layout in your Drupal admin.
  • Add Custom Block: Click the "Add custom block" button.
  • Configure Block:
    • Label: Give your block a descriptive name.
    • Body: Enter the content for your block (text, HTML, or embed code).
    • Visibility: Determine where the block should appear (all pages, specific paths, etc.).
  • Place Block: Once saved, you can drag and drop the block to desired regions of your theme.
  • Save Configuration: Save the block layout to apply changes.

 

02.

Views

Views are like custom queries that pull information from your Drupal content. Think of them as data filters. You can create a view to display a list of "Upcoming Events" or a "Blog Post Archive" sorted by date. Views offer flexibility in displaying and filtering content based on your needs.

Creating views

Access Views: Navigate to Structure -> Views in your Drupal admin.

Add a new view: Click the "Add new view" button.

Basic information: Provide a name for your view, choose the content type to display, and decide if you want to create a page or a block.

Configure fields: Select the fields you want to display from the content type.

Filter content: Apply filters to show specific content based on criteria.

Sort content: Determine the order in which content should appear.

Arrange content: Define the layout of the view (e.g., grid, table).

Save the view: Click "Save" to finalize your view.