How to create a custom footer block in Drupal 7
When customizing your site to best represent you or your company, you will want to change some areas from the default displays. One of these is the footer. The default footer displays the text 'Powered by Drupal'. While this may be fine, perhaps you want to add a copyright for your business, or contact information such as an address and phone number. This article will explain how to create your custom footer to replace the default one in your Drupal 7 website.
Creating a custom foooter in Drupal 7
- Log into your Drupal 7 admin dashboard.
- From the top menu bar, locate the Structure option and click it.
- This leads you to the Structure menu. From here, find and click on the Blocksoption.
- From the main block list, select the Add Block option.
- This brings you to the New block creation screen. From here fill out the appropriate fields on the page.
Block Title Optional title for the block. The text entered here will display on the page. Block Description The title that will appear in the back end. This is the name displayed in the Block list. Block Body The content you want to display on the webpage footer. Region Settings A set of dropdowns for each theme. Select which area you want the new block to appear. In this case, the Footer area of the Bartik theme. Visibility Settings Various restriction options. By default, it will display on all pages and for all users.
- Once you have the settings inserted, click the Save Block button at the bottom of the page.
- You now want to confirm that the new block is showing in the Footer are of the theme.
Your new footer should now display on yoru website. Below is a before and after screenshot of the changes made in this tutorial.
‹Section 4: Changing the region a block is assigned to in Drupal 7
›Section 6: How to customize your sidebar blocks in Drupal 7
Support Center LoginOur Login page has moved, Click the button below to be taken to the login page.
Social Media Login
Working with Blocks and Regions in Drupal 7
2014-07-11 1:59 am
Hello Jim, and thanks for your question.
You can center Drupal footer text by applying the following CSS rule to your footer:
It could be a bit different depending on your theme, but here is what I had to edit and add:
/themes/bartik/css/style.css Line 841
/* ------------------ Footer ------------------ */
Please let us know if that does the trick for you!
2016-05-18 1:54 am
Step 1. Go to your theme folder and look for “.info” file. I am using theme “corporate” so info <a href="http://essayservices.org/">file</a> will be located “themes\corporate\corporate.info”. You will see different location/blocks in your theme. like below:
regions[header] = Header regions[content] = Content regions[help] = Help regions[footer] = Footer
Step 2. Add your block into the file like below:
regions[header] = Header regions[content] = Content regions[help] = Help regions[footer] = Footer regions[welcome_header] = Welcome Header
Step 3. Update your template file with this new block. Open “page.tpl.php” located in “themes\corporate\templates” and add your block like below:
<?php if ($page['welcome_header']): ?> <div id="welcome_header" class="welcome_user"> <div class="section"> <?php print render($page['welcome_header']); ?> </div> </div> <?php endif; ?>
Step 4. Release the cache from admin -> Configuration -> Performance. And click “Clear Cache” button to release the cache. Now if you go the block in structure, you can see “welcome Header” section is getting listed in region drop down. Now you can select “Welcome Header” region for your block.
- Source from sforsuresh.in