Tutorial: Displaying blog posts on the front page

You can customize the appearance of the front page of your Developer Portal to display recent blog posts. You might use the blog posts to provide your users with information, such as service availability or marketing campaigns.

Before you begin

You must have a Developer Portal enabled, and you must have administrator access to complete this tutorial. The tutorial Creating the Portal explains how to enable the portal if you have not already done so.

About this tutorial

In this task, you create a view, customize that view to show blog posts, then embed that view on the front page of your Developer Portal site.

Before you begin, the front page looks like this: An image of the front page

This tutorial takes you through the following steps:
  1. Create a view.
  2. Customize the view.
  3. Embed the view on the front page of your Developer Portal.

Create a view

  1. Log in to your Developer Portal as an administrator.
  2. Navigate to Structure > Views.
  3. Click +Add view.
  4. In the View name field, enter a name for your view, for example Recent Blog posts.
  5. Under View settings, select the options as follows:
    • Show - Content
    • of type - Blog post
    • sorted by - Newest first
  6. Under Block settings, select the Create a block checkbox and choose the number of blog posts that you want to display.

    Setting options for the blog post

  7. Click Save and edit.

Customize the view

You are now on the page where you can edit your view.

  1. If you are not on the edit view page, navigate to Structure > Views, find the name of the view that you created, and click Edit.
  2. In the Format section, click Unformatted list.
  3. Select Bootstrap List Group, then click Apply.
  4. Select Content: Title from the Title field list, then click Apply.
  5. Click Save.

Embed the view on the front page of your Developer Portal

  1. Navigate to Structure > Pages.
  2. From the list of labels, find welcome and click Edit.
  3. Navigate to Panels > Content.
  4. Click Add new block.
  5. Under LISTS(VIEWS), select your new block.
  6. Select the number of Items per block, then click Add block.

    Adding a block to the welcome page

  7. You can now rearrange the position of the blog post on the front page.

    Sort the block on the front page

  8. Click Update and save.

What you did in this tutorial

You can check that the view you created appears on the front page of your site page.

The new frontpage with blog posts

What to do next

You can edit your view at any time by navigating to Structure > Views and selecting your view by its name. You can also modify or delete the view's layout on the front page by navigating back to the layout section of your page under Structure > Pages.