We are working on a website - we want to provide the theme(front-end UI) also want to implement some backend features with theme only. Is it possible ?

Use case: We are building a theme for a Critical Website. We want to create custom content type for our Website project. This can be implemented easily through Module. But we want to implement this only thgouh the theme. 

Is the above scenario possible. 

Along with the above requirement - we are looking for to create(implement) module features only through theme(is it possible). 

Reason to ask this: In wordpress the usual things would be carried out through theme, even if we do not use Plugins, we could implement through functions.php file. This is not wordpress, nor we want to imitate the same here. 

But can the same be done - if plugin features(like create content type, field) can be impemented through theme - it will be easy to keep track of the Site better and site will be cleaner and more managable for System Admin. 

The use case can be many, but we want to know if the above can be done, if so - how, and what are the limitations if any. Detailed answer requested. 

If someone can shed light on this. 

Comments

VM’s picture

no.

John Pitcairn’s picture

No.

From Drupal 8.9.0, your theme can declare specific modules as dependencies, so you could add a module to create your content type (or whatever) and declare that module as a dependency in your theme.

But in Drupal terms, the strict equivalent to a Wordpress "theme" is a Drupal "distribution", which generally includes an install profile that specifies a specific theme, specific modules, and install scripts.

Jaypan’s picture

John is correct. What in Wordpress is called a "Theme" is called a distribution in Drupal.