PHPackages                             ec-europa/atomium - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ec-europa/atomium

AbandonedArchivedDrupal-theme

ec-europa/atomium
=================

A clean and atomic base theme.

965[32 issues](https://github.com/ec-europa/atomium/issues)[7 PRs](https://github.com/ec-europa/atomium/pulls)PHP

Since Mar 3Pushed 6y ago9 watchersCompare

[ Source](https://github.com/ec-europa/atomium)[ Packagist](https://packagist.org/packages/ec-europa/atomium)[ RSS](/packages/ec-europa-atomium/feed)WikiDiscussions 7.x-3.x Synced yesterday

READMEChangelog (10)DependenciesVersions (21)Used By (0)

Atomium
=======

[](#atomium)

[![Build Status](https://camo.githubusercontent.com/2069ea4805debcc5b7dc19e01c29eab2aad44f062fb41c6e47bd14af3a91f9a6/68747470733a2f2f64726f6e652e66706669732e65752f6170692f6261646765732f65632d6575726f70612f61746f6d69756d2f7374617475732e7376673f6272616e63683d372e782d332e78)](https://drone.fpfis.eu/ec-europa/atomium)[![GitHub issues](https://camo.githubusercontent.com/b7485f96e18e87d8f8055b967877ddd37c72015a57d68d49ac6904d910f225da/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f65632d6575726f70612f61746f6d69756d2e737667)](https://github.com/ec-europa/atomium/issues?q=is:open+is:issue)[![Current Release](https://camo.githubusercontent.com/780bc7d634cc4dc0163e267dd78ec135a3a663787ec7708951a8e16f60624e14/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f65632d6575726f70612f61746f6d69756d2e737667)](https://github.com/ec-europa/atomium/releases)

The Atomium theme is a Drupal 7 base theme.

The goal of this base theme is to rewrite most of the core theme functions of Drupal and use proper render arrays and templates instead. This will allow users to customize most of the elements in a custom sub-theme using preprocess functions or by providing a custom template.

Table of contents:
==================

[](#table-of-contents)

- [Installation](#installation)
- [Requirements](#requirements)
- [Activation](#activation)
- [Configuration](#configuration)
- [Contributing](#contributing)
- [Extending](#extending)
- [Developers note](#developers-note)
- [In the press](#in-the-press)

[Go to top](#table-of-content)

Installation &amp; requirements
===============================

[](#installation--requirements)

Since the branch 7-x-3.x, Atomium requires the module [Registry on steroids](https://www.drupal.org/project/registryonsteroids) and its submodule to be installed and enabled.

As it is technically not possible for a theme to depends on a module, please make sure that these modules are enabled.

[Download the theme manually](https://www.drupal.org/docs/7/extending-drupal/installing-themes) or using [Drush](https://drupal.org/project/drush).

Requirements
============

[](#requirements)

- PHP: greater or equal to version 5.6.
- Drupal 7: latest stable version,
- Drupal contrib module: [Registry on steroids](https://drupal.org/project/registryonsteroids)

[Go to top](#table-of-content)

Activation
==========

[](#activation)

To enable the theme, go to `admin/appearance` and select an Atomium based theme.

Atomium comes with "Atomium Bartik" sub-theme provided as an example, also, it can be used as a starter-kit. It is a fork of the Bartik core theme but based on Atomium.

The sub-theme provide examples of *preprocess* functions and templates, allowing custom theme to be crafted quickly.

[Go to top](#table-of-content)

Configuration
=============

[](#configuration)

Atomium is not intended to be a full featured theme as most of themes on drupal.org, full of configurable settings and with a friendly user interface. The sole purpose of this theme is to provide clean markup that can be easily extend.

However, Atomium provides the following setting:

- Allow CSS double underscore.

The theme debug mode setting has been moved to [Registry on steroids](https://drupal.org/project/registryonsteroids)module.

As of Drupal 7.51, a new `allow_css_double_underscores` variable has been added to allow for double underscores in CSS identifiers. In order to allow CSS identifiers to contain double underscores (`.example__selector`) for Drupal's [BEM-style naming standards](http://getbem.com/), this variable can be set to TRUE.

[Go to top](#table-of-content)

Contributing
============

[](#contributing)

Atomium is licenced under the [EUPL Licence](https://en.wikipedia.org/wiki/European_Union_Public_Licence). All contributions to Atomium and its sub-themes are made on [Github](https://github.com/ec-europa/atomium), the main Atomium repository.

To ensure its code quality, Atomium depends on:

- [GrumPHP](https://github.com/phpro/grumphp)
- [Drupal conventions](https://github.com/drupol/drupal-conventions)

In order to use it and pass the automated tests, run:

Using Docker Compose
--------------------

[](#using-docker-compose)

A very easy and handy way to speed up the development environment is by using [Docker](https://www.docker.com/get-docker) and [Docker Compose](https://docs.docker.com/compose/).

Docker provides the necessary services and tools such as a web server and a database server to get the site running, independent of host machine configuration.

### Requirements:

[](#requirements-1)

- [Docker](https://www.docker.com/get-docker)
- [Docker Compose](https://docs.docker.com/compose/)

### Configuration

[](#configuration-1)

By default, Docker Compose reads two files, a `docker-compose.yml` and an optional `docker-compose.override.yml` file. By convention, the `docker-compose.yml` contains the common configuration and it is provided by default. The override file, as its name implies, can contain configuration overrides for existing services or entirely new services. If a service is defined in both files, Docker Compose merges the configurations. By using `.env` file to define variables, such as PHP version, which allows a quick debug on docker-compose by running the below command without spinup the container and also avoid hard-coding values.

```
docker-compose config
```

Find more information on Docker Compose extension mechanism on [the official Docker Compose documentation](https://docs.docker.com/compose/extends/).

### Usage

[](#usage)

To start, run:

```
docker-compose up
```

It is advised to not daemonise `docker-compose` so it can be turned off (`CTRL+C`) quickly when it is not anymore needed. However, there is an option to run docker on background by using the flag `-d`:

```
docker-compose up -d
```

Then:

```
docker-compose exec web composer install
docker-compose exec web ./vendor/bin/taskman drupal:site-install
```

Using default configuration, the development site files should be available in the `build` directory and the development site should be available at: .

### Running the tests

[](#running-the-tests)

To run the grumphp checks:

```
docker-compose exec web ./vendor/bin/grumphp run
```

To run the phpunit tests:

```
docker-compose exec web ./vendor/bin/phpunit
```

Without docker
--------------

[](#without-docker)

```
composer install
```

This will:

1. Build a target test site in `./build`
2. Run `$ ./vendor/bin/taskman drupal:site-setup` which will setup site and tests configuration files, such as `phpunit.xml`

After that:

1. Copy `taskman.yml.dist` into `taskman.yml` and customize it according to your local environment
2. Install the site by running `$ ./vendor/bin/taskman drupal:site-install`

For a list of available commands run:

```
./vendor/bin/taskman
```

### Generate changelog

[](#generate-changelog)

Place your token in `taskman.yml` file:

```
github:
  token: YOUR_TOKEN
```

and then:

```
./vendor/bin/taskman github:changelog
```

For more information about how to customise the building process check [PHP Taskman](https://github.com/php-taskman/core)project page.

[Go to top](#table-of-content)

Extending
=========

[](#extending)

Atomium provides a way of extending just by creating some files without modifying the core Atomium files. Each theme definition, core or custom, is treated as a component. Theme definitions can be found in the *templates* directory of each sub-theme.

To create a new theme definition:

- Create a directory in *templates* and name it as desired. A good practice is to give it the name of the definition.
- Create a file *\[NAME-OF-THE-THEME-DEFINITION\].component.inc*,
- Create the function *\[NAME-OF-THE-THEME\]\_atomium\_theme\_\[NAME-OF-THE-THEME-DEFINITION\]()*,
- Create a file *\[NAME-OF-THE-THEME\_DEFINITION\].css* and/or *\[NAME-OF-THE-THEME\_DEFINITION\].js* to get these files automatically loaded.

Atomium provides a custom page available on the path: `atomium-overview`. This particular page is only available to users with `_administer themes_ permission`.

This page acts as a showcase page of components. To add a component in there, a custom component needs to define two hooks:

- `hook_atomium_definition_hook()`

    This hook allows to define only one component.
- `hook_atomium_definition_form_hook()`

    This hook allows to define one or multiple components in a Drupal form.

For a better understanding and examples, see the [atomium.api.php](https://github.com/ec-europa/atomium/blob/7.x-1.x/atomium/atomium.api.php) file.

Do not forget to clear the cache every time a new theme definition or process/preprocess is added or removed.

[Go to top](#table-of-content)

Developer's note
================

[](#developers-note)

During the development of this project, a lot of time has been put into analyzing how Drupal's core functions were implemented and how to improve them for better customization.

A good example of this is the breadcrumb generation.

Let's analyse how it is currently done in Drupal and how it is implemented on this project.

```
$variables['breadcrumb'] = theme('breadcrumb', array('breadcrumb' => drupal_get_breadcrumb()));
```

By default, Drupal uses the function `drupal_get_breadcrumb()` in its `template_process_page()` hook.

The function `drupal_get_breadcrumb()` returns raw HTML. Thus, it is impossible to alter the breadcrumbs links properly.

In order to get a render array, it requires a deeper analyse and rewrite functions accordingly.

`drupal_get_breadcrumb()` calls `menu_get_active_breadcrumb()`. This is actually the function that returns the HTML.

There is no way to alter the result of that function as it returns an array of raw HTML links.

Unfortunately, in order to change this behaviour, two extra functions were implemented in Atomium, also the way the breadcrumb is generated changed, by overriding the default one as shown below:

```
  $variables['breadcrumb'] = array(
    '#theme' => array('breadcrumb'),
    '#breadcrumb' => atomium_drupal_get_breadcrumb(),
  );
```

`atomium_drupal_get_breadcrumb()` is an Atomium internal function written only for the breadcrumb handling. Instead of calling `menu_get_active_breadcrumb()`, it calls `atomium_menu_get_active_breadcrumb()` which is also a custom Atomium function that, instead of returning an array of raw HTML links, returns an array of render arrays.

This is why, in `page.tpl.php`, instead of writing:

```

```

should be:

```

```

The rendering process is at the very end of the Drupal's chain of preprocess, process and render functions.

[Go to top](#table-of-content)

In the press
============

[](#in-the-press)

- [A word about Atomium](http://not-a-number.io/2017/a-word-about-atomium)

[Go to top](#table-of-content)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/caac07a8b3883a140b586c1a6ef963f2b688fbdac6e045b24f5623af5497b30f?d=identicon)[ec-europa](/maintainers/ec-europa)

---

Top Contributors

[![drupol](https://avatars.githubusercontent.com/u/252042?v=4)](https://github.com/drupol "drupol (276 commits)")[![aritomelo](https://avatars.githubusercontent.com/u/9381722?v=4)](https://github.com/aritomelo "aritomelo (49 commits)")[![ademarco](https://avatars.githubusercontent.com/u/153362?v=4)](https://github.com/ademarco "ademarco (26 commits)")[![voidtek](https://avatars.githubusercontent.com/u/186827?v=4)](https://github.com/voidtek "voidtek (5 commits)")[![donquixote](https://avatars.githubusercontent.com/u/150032?v=4)](https://github.com/donquixote "donquixote (4 commits)")[![imanoleguskiza](https://avatars.githubusercontent.com/u/14978592?v=4)](https://github.com/imanoleguskiza "imanoleguskiza (2 commits)")[![kugta](https://avatars.githubusercontent.com/u/380659?v=4)](https://github.com/kugta "kugta (2 commits)")[![Fefaine](https://avatars.githubusercontent.com/u/9037645?v=4)](https://github.com/Fefaine "Fefaine (1 commits)")[![netlooker](https://avatars.githubusercontent.com/u/7669736?v=4)](https://github.com/netlooker "netlooker (1 commits)")[![richardcanoe](https://avatars.githubusercontent.com/u/1321598?v=4)](https://github.com/richardcanoe "richardcanoe (1 commits)")[![ku-enza](https://avatars.githubusercontent.com/u/2235848?v=4)](https://github.com/ku-enza "ku-enza (1 commits)")

### Embed Badge

![Health badge](/badges/ec-europa-atomium/health.svg)

```
[![Health](https://phpackages.com/badges/ec-europa-atomium/health.svg)](https://phpackages.com/packages/ec-europa-atomium)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
