- Home
- Build pages
- Follow a tutorial
- Blog layout
Design a blog listing layout
Here you build the page that lists your blog posts: a featured post at the top, a listing from a Drupal view with a sidebar, and a newsletter band. New posts appear on it without editing the page. To tell one customer story in depth, follow Write up a case study instead.
The video builds the blog of a reporting product.
Before you start
- Your role has the Edit with DXPR Builder permission.
- Your site has a view that lists blog posts. DXPR CMS ships a Blog view with a Blog listing and a Featured posts display.
- The page is open in the builder. For a new one, go to Content > Add content > Landing Page (
/node/add/landing_page) and click Save. - New elements land at the top of their column. Add the elements of a column in reverse order, or drag them into place afterwards.
Step 1: add the featured post
- Click Add Elements on the empty page and pick Section from the Layout tab.
- Click + on the section and pick Row; it arrives with two equal columns. Click its grid icon (Column layout), pick the 2/3 + 1/3 preset and click Save.
- Click + in the wide column and pick Image from the Content tab. Click Select Image, tick a photo and click Insert selected. Type the Alt attribute in the SEO panel and click Save.
- Click + in the narrow column and pick Button. Set Title to "Read more", Link to the post and keep Type on Primary, then click Save.
- Click + in the narrow column again and pick Text; it lands above the button. Type the post title as Heading 2, add the excerpt below it and click Save.
Step 2: add the listing and sidebar
- Hover the section and click Add Section Below. Add a Row to it with the 2/3 + 1/3 preset.
- Click + in the wide column and open the Drupal Views tab. Pick View: Blog (Blog) and click Save; it renders your posts.
- Click + in the narrow column and open the Drupal Views tab. Pick View: Blog (Featured posts) and click Save.
- Click + in the narrow column again and open the Drupal Blocks tab. Pick Block: Forms: Search form and click Save; it lands above the featured posts.
Step 3: add the newsletter band
- Add a third section with Add Section Below. Open its More > Settings, pick the navy Background in the Style panel and click Save.
- Click + on the section and pick Button. Set Title to "Subscribe to the newsletter", Link to
/newsletterand Type to Light, then click Save. - Click + again and pick Text; it lands above the button. Type "Stay updated" as Heading 2 and one line about the newsletter below it. Set Font color to white in the Style panel and click Save.
Step 4: save and preview
- Click Save on the builder toolbar.
- Open the view menu (the eye icon) and choose Preview.
Go further
Not shown in the video:
- Signup form: add a newsletter form block from the Drupal Blocks tab in place of the button; see Add forms to pages
- Categories: add a view of your blog categories to the sidebar
- Sidebar tint: open the narrow column's settings and give it a light grey Background and some padding in the Style panel
What you see
The featured post opens the page: a wide photo on the left, its title, excerpt and Read more button on the right. Below it your posts fill the wide column, with the search form and featured posts in the sidebar. A navy band closes the page with the Stay updated heading and the Subscribe to the newsletter button.
If you don't see your posts
- The Blog view is not in the Drupal Views tab. The view is disabled, or your builder user profile hides it. Enable it at Structure > Views (
/admin/structure/views), or ask an administrator to tick it under Views in your user profile. - The listing column stays empty. The view has no published posts to show. Publish a post at Content > Add content > Blog post, then reload the page.
- The search form is not in the Drupal Blocks tab. The core Search module provides that block. Turn it on at Extend (
/admin/modules). - Your changes are gone after a reload. You left the page before clicking Save on the builder toolbar. If Save shows an error, see Changes do not save.
What's next?
- Add forms to pages for signup forms
- Drupal Views integration for configuring views
- Drupal Blocks integration for sidebar blocks
- About page for the next tutorial
Something wrong or missing on this page?
Report it
or edit the page.