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
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Drupal as a Headless CMS for Static Sites
  • Address Non-Functional Requirements: How To Improve Performance
  • How To Add a Chatbot to Your Drupal Website
  • FileNet Integration Process

Trending

  • Building Reliable LLM-Powered Microservices With Kubernetes on AWS
  • Software Delivery at Scale: Centralized Jenkins Pipeline for Optimal Efficiency
  • Manual Sharding in PostgreSQL: A Step-by-Step Implementation Guide
  • The Smart Way to Talk to Your Database: Why Hybrid API + NL2SQL Wins
  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 user avatar
Alejandro Oses
·
Jan. 15, 24 · Opinion
Likes (1)
Comment
Save
Tweet
Share
2.5K Views

Join the DZone community and get the full member experience.

Join For Free

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
  • Address Non-Functional Requirements: How To Improve Performance
  • How To Add a Chatbot to Your Drupal Website
  • FileNet Integration Process

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!