While customizing the Drupal theme, we need to use Drupal's built-in functions and variables.
If there is a need to create theme-specific functions and methods, then that can be done in the template.php
file located in Drupal's themes
folder.
Availability of these variables depends on whether they have been enabled in the Admin panel or not.
To populate a raw HTML file with dynamic content, you need to use Drupal variables.
These variables can be found at the following link (the user can refer to API to know the details of the Drupal variable):
https://api.drupal.org/api/drupal/globals/7
We need to configure the .info
file. This file has key-value pairs with the keys on the left and the values on the right. Semicolons are used for comments.
The following information is provided in the .info
file:
Name of the theme
Description of the theme
Version of the theme
Stylesheet to be used in the template
You can get more information about the
.info
file at
We can configure HTML in Drupal by performing the following steps:
Break down your HTML code as per the Drupal templates.
You need to identify the header, footer, and body part with your HTML code.
Configure CSS in the
.info
file. A CSS file will be picked up from this path. Start populating HTM using the Drupal variable.Write down the
.info
file or make changes in the.info
file of thegarland
theme as per the new theme.Click on the Clear all caches button located at Administration | Configuration | Development | Performance.