Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How can I create a custom region in my drupal template?



How can I create a custom region in my drupal template?..

Answer / Annapurna Saroj

To create a custom region in your Drupal theme, follow these steps:
1. Create a new .tpl.php file for the page or block template where you want to add the new region (e.g., page--node.tpl.php).
2. Add the custom region using the following code within the desired location of the template file:
```php
<div<?php print $classes_array; ?>>
<?php print render($region['custom_region']); ?>
</div>
```
3. Define the custom region in your theme's .info.yml or .info file:
```yaml
regions:
custom_region:
label: Custom Region
```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Drupal Interview Questions

Explain about workbench moderation module

1 Answers  


What is drupal used for?

1 Answers  


Explain what is drupal weight?

1 Answers  


How to update themes and modules in drupal?

1 Answers  


what is render array in Drupal?

1 Answers  


What are the key features of drupal?

1 Answers  


For better search what we can do in drupal 7?

1 Answers  


Did you contributed the drupal site (any module)?

0 Answers  


Explain updating drupal?

1 Answers  


Which are the core required modules in drupal?

1 Answers  


Explain the block in drupal?

1 Answers  


What is clean url in drupal?

1 Answers  


Categories