DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Drupal as a Headless CMS for Static Sites
  • Pure Headless vs Hybrid Headless CMS: A Practical Decision Framework
  • Strapi v5: Customization Nuances
  • Mastering Approximate Top K: Choosing Optimal Count-Min Sketch Parameters

Trending

  • Searching Kafka Without an Index: Lessons From Building Message Search for Kafdrop
  • When a Coding Agent Fixes the Test Instead of the Bug
  • Beyond the Endpoint: How Agent Cards Enable Discovery, Interoperability, and Trust
  • Claude Code Superpowers: The 5-Tool Stack That Ends Limits and Context Amnesia

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Coding
  3. Frameworks
  4. Drupal 10 and Its Single Directory Component

Drupal 10 and Its Single Directory Component

Drupal, in a nutshell, is a free and open-source content management system (CMS) that enables users to quickly construct and manage websites.

By 
Alejandro Oses
·
Jan. 15, 24 · Opinion
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
3.0K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

Drupal is a good example of a functional CMS. Drupal, in a nutshell, is a free and open-source content management system (CMS) that enables users to quickly construct and manage websites.

It is written in PHP and supports a variety of content kinds, such as text, photos, videos, and more. Drupal offers a flexible and highly adaptable foundation for website development, making it suited for a wide range of applications, from personal blogs to huge enterprise sites.

Single Directory Components in Drupal 10

Duplicate code for the same component or variants generated by separate developers is typical in Drupal. This makes it difficult to maintain, reuse, edit, or delete components from the code base, as well as troubleshoot an issue if it is unclear which template, CSS, or JS is at fault.

To solve these issues, Drupal developers employed Emulsify or Pattern Lab.

SDC is an abbreviation for Single Directory Components. "It is a way to organize components in a single directory instead of dividing them into different folders," they explain in the Drupal manual. 

“Single Directory Components is a new theming approach in Drupal 10.1, where all the files needed to render a web component (a button, a carousel, a menu, etc.) are grouped into a single directory,” they explain.

When the component is invoked, SDC automatically discovers the directory and produces the library with all of the files. As an experimental module with the same name, the Single Directory Components capability was included in the core of Drupal 10.1.

SDC allows us to override assets such as CSS and JavaScript, making Modular CSS easier to install and alleviating the typical render-blocking issue in Drupal projects. Furthermore, this type of component enables us to create a shared design system with independent or merged UI elements that adhere to Atomic Design principles.

Other Important Components of Drupal

Aside from Drupal's unique directory component, there are others in this multifunctional CMS that stand out for the benefits they give to the end user when building their web pages. In my opinion, these are the most important ones:

  • Nodes: Nodes are fundamental building blocks in Drupal. They represent individual pieces of content and can include various types, such as articles, pages, blog posts, etc.
  • Modules: Modules are units of functionality that can be added to Drupal to extend its capabilities. Drupal core comes with a set of essential modules, and additional modules can be installed to add specific functionalities like SEO tools, e-commerce, social media integration, etc.
  • Themes: Themes control the appearance of a Drupal site. Drupal allows you to install and customize themes to change the look and feel of your website. Themes include templates, style sheets, and sometimes JavaScript files.
  • Blocks: Blocks are sections of content that can be placed in regions of a page. They can contain various types of content or functionality, such as menus, recent posts, or custom HTML.
  • Taxonomy: Taxonomy in Drupal refers to the way content is categorized. It allows you to categorize content using terms and vocabulary, making it easier to organize and find information on your site.

Drupal is a technology that is constantly changing, and it is fascinating to be able to see them all and learn how their benefits are applied to a website.

Content management system Drupal

Opinions expressed by DZone contributors are their own.

Related

  • Drupal as a Headless CMS for Static Sites
  • Pure Headless vs Hybrid Headless CMS: A Practical Decision Framework
  • Strapi v5: Customization Nuances
  • Mastering Approximate Top K: Choosing Optimal Count-Min Sketch Parameters

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook