Drupal

How to create custom regions in drupal?

Drupal is one of famous content management systems. Corporate, News and Shopping Cart sites can easily be built in drupal and sometimes to fulfill our requirements we need to create custom regions in our theme that can be done very easily. You just need to edit your theme’s info file.

  • Open your theme directory in which you want to create new region.
  • There will be a your_theme_name.info file. Open it in notepad or in your favorite editor.
  • In this file you will find your theme complete information i.e. version, style sheets, regions (already created) and here you will define your own region by following statement.
  • region[your_region_name] = Your Custom Region
  • Your custom region will be shown in Drupal Blocks Admin and you can assign any block or views to that region.
  • Following syntax is to access your region in drupal template files.
    <?php
       if( $your_region_name ){
         print($your_region_name);
       }
    ?>
    

*your_region_name (give your own region name. This will be a variable by which you will access your region in any page.)

Use self explanatory keywords for your regions for instance gallery, headlines,…

websourceblog

ReactJs, NodeJs, Amazon Web Services, Symfony, Laravel, CodeIgniter, Zend Framework, WordPress, Drupal, Magento, Angular

View Comments

  • I was very happy to seek out this net-site. I wished to thank in your time for this glorious read! I definitely enjoying each little bit of it. Can I simply say what a reduction to find someone who actually is aware of what they are talking about on the internet. It's laborious to search out knowledgeable individuals on this subject however you definitely know easy methods to convey an issue to light and make it important. Extra folks have to read this and perceive this facet of the story. I cant believe youre not more standard since you undoubtedly have the gift. however you sound like you understand what you're speaking about. Additionally, I simply gave this onto a colleague who was doing a little analysis on this. And he reality is bought me breakfast outcome I discovered it for him. So let me reword that: Thanks for the deal with and for spending the time to debate this, I really feel strongly about it and love studying extra on this topic. If attainable, would you mind updating your weblog with more particulars? Its highly helpful for me. Big thumb up for this blog submit!
    Acheter vimax en France.2011AVEF

  • Very informative, especially for those who are finding difficulties in customizing their Drupal themes.

  • 301 Moved Permanently I was suggested this web site by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my trouble. You're amazing! Thanks! your article about 301 Moved Permanently Best Regards Veronica Shane

  • Hey There. I found your blog using msn. This is an extremely well written article. I'll make sure to bookmark it . Thanks for the post. I will certainly comeback.

  • Excellent posts to read keep it up and keep going on this way. And keep sharing these types of things Thanks and I read your article and I keep reading your content.. It’s very interesting..

  • Way cool! Some extremely valid points! I appreciate you penning this article and the rest of the website is also
    very good.

Recent Posts

How to install and configure Apache2 on WSL2?

I hope you already have WSL2 installed and enabled. So, setting up Apache2 on WSL2…

4 months ago

How to install NVM on Windows?

Install NVM on Windows Node Js is a JavaScript runtime environment used widely in today’s…

5 months ago

How to reset WSL 2 user’s password?

You can easily reset WSL 2 users' password, by just following the following steps. Open…

9 months ago

DreamHost Web Hosting

DreamHost a web hosting company, founded in 1997. It is offering sort of hosting services,…

1 year ago

How to add submenu or menu in any specific menu option in WordPress programmatically?

Menus in WordPress are highly versatile and can be easily modified to change in your…

2 years ago

Laravel 8 error target class controller does not exist.

Laravel is famous and robust PHP framework, widely used in different type of projects. While…

2 years ago