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

Updated: 24 June, 2014 seen 990

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!