Creating Home page and basic pages
Blog

Creating Home page and basic pages

Creating a home page or front page in Drupal 8 is quite similar to the way we used to do Drupal 7. By default home page will list out all the nodes in teaser view. We just need to create a new page and schedule it  to display on page or you can also promote other node  to be displayed on home page. However, most of time we would like to have a custom page as our site home page not like listing of teaser view. In this blog post I will explain the process of changing the front page of your new Drupal 8 website.

Step 1 :  Log into your Drupal 8    
Step 2 : select “manage”  menu from the toolbar from   the main menu on the top.

admin_toolbar_menu

Under manage there is option of  “configuration

admin_toolbar_menu_expanded

 

Step 3 : clicking on configuration will redirect you to Home >> Administration
click on “site information” under SYSTEM. Under Front Page provide the Default Front page url & that page would be assigned as home page for our site.

I have assigned node id 4 to display as page.

site_information_setting

After entering the chosen node, click on the Save Configuration. Now when you click the site logo or Home menu link, you should see the newly assigned node as home page.

Default page: when we don’t have any assigned page in our site setting in that case user page of logged in user  itself becomes the front page of your drupal site.

drupal_default_home_page


 

home_page_assign_to_node

Creating a Basic page

Step 1: To add Basic page  go to content >> Add content >> Basic Page

creating_basic_page


Step 2: If you would like to add some additional field on Basic page click on Structure >> Content types >> Basic page >>  Manage fields >> Add field

manage_field

 

Step 3: Let's add one email field for basic page with label “Mail”. For this we need to go to admin >> structure >> types >> manage >> page  >> fields and click on Add field.

mange_field_label

Step 4: Limit the no of values for email field. In this case I am limiting it to 2

 manage_field_no_of_values

Step 5: Next we will change label name, help text, default value etc for the fields we added above.

manage_field_settings

 

Step 6: So now we are done with adding the field,.we can view the field under page manage field tab.

custom_field_displaying

Step 7: Add a new page by visiting https://drupal-8.0.2/node/add/page .
we can see our newly added two mail field with default value. Fill up all the detail and Save and Publish the page.

create_page

Step 8: Once basic page has been submitted you will be redirected to node view page.

page_with_additional_info

We have completed how to assign a specific node to Home page  as well as create a new basic page.