Front page - customize with Block

customize Drupal front page with block You can change the Drupal's default front page (i.e. the standard "Welcome page") via a number of ways. The easiest is documented in our article "Drupal Front page - how to change"

Here we will show another way while retaining the ability to promote selected articles to the front page / home page when you desire.

Create a new Block

First we need to create a new block. To do this, go to:
Administer > Site Building > Blocks > Add block[tab]

You will need to fill in the compulsory field 'Block Description'.
This is just an internal name you assign to the block. Name it something descriptive so you can easily recognize it. This is how this block will be labeled in your list of Blocks page.

As this block is for the home page, I give it a name like, "homepage_block"
'Block Title': you can leave this blank unless you want your block to have a title that is displayed to the public.
'Block body': This is the crucial bit. Enter the text you want which will appear on your front page when you make this block visible later. HTML code is allowed.

You can customize the other configurations as you wish (e.g. whether a specific user-role can view this block or not). The configuration that is important here is:

'Page specifics visibility settings': As you only want this to appear on your front page, set
Show block on specific page = Show on only the listed pages.
And then in the 'Pages' box, enter
<front>
ensuring that this block will only appear on the front page.
Save the block.

Make your new block visible

Any block that you create is by default 'disabled' (i.e. not visible) until you assign it to a specific region.

Once you have saved your "homepage_block" you will be returned to your listing of blocks page.
Under 'Disabled' section, you will see your newly created "homepage_block" (or whatever else you might have name it).

You can move this block (by dragging the 4-direction arrow) to the region of your choice.
I have put it under the region: 'content top'

Once you have it in the region you want, save the blocks.

That's it. On your front page, you should see the contents of your new block.

Note that using the blocks method above will NOT remove the Drupal default Welcome page from your front page. But as soon as you publish and article and promote it to the front page, that Welcome page will be replaced.

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

 

Healthful Soulful Things

Custom Search