Building a Drupal site from scratch - part 5 - Custom fronpage

Updated: 24 June, 2014 seen 992

By default Drupal comes with frontpage set to display latest 10 nodes from your site:

Which might be ok, if you are runing some blog, but if you are looking the ways how to change default frontpage, you must take a look under system/site-information. In the section default front page it's set to /node (container of your latest posts)

I'll show one technique I'm using to setup custom, views powered frontpage:

In previous parts of this tutorial I have already showed how to install views and how to create a view 

This time we gonna enable view frontpage from our views page:

 

Go to /admin/structure/views and search for View Front page, anc click on button - enable. Then move to edit this view:

  • Change Format show from Content to Fields
  • Add a new field Custom text
  • Uncheck Create a Label
  • Under Pager settings, change pager to Display a specified number of items and enter 1 in items per page
  • Save your view
Now go back to Site information, and change /node to /frontpage
 
Now visiting your front page, you should see - nothing! That's great - in next parts I'll show how to add blocks to theme regions, so you have you custom frontpage rocking!

 

 

about

Hi! My name is Reinis Fischer (38), a proud dad and devoted husband. CEO and Founder of Terramatris crypto hedge fund, drone enthusiast, world traveler, photographer, and passionate lover of Georgian cuisine (vegetarian).

An ex-pat living in Georgia since 2011, I trade stocks, take photographs, work out at the gym, and many more. Here I write about travel, finance, and other things that might interest me.