I have a blog setup on my website. The blog is updated once a day. I would like to have my newest blog post and ONLY my newest blog post displayed on my home page. The checkbox for "promoted to homepage" was checked and that worked for getting the newest post on the home page, but it was only a teaser and it was displayed along with all the other old blog posts.

Is there any way to have my new, FULL blog posts (not just the teaser) automatically displayed on my homepage?

Comments

Finbarr’s picture

Hello,

This is easily achievable with the views module.

  • Install the views module
  • Goto admin > site building > views
  • Add a new view of type node
  • Add filters 'node type' : 'blog' and 'promoted to front page' : 'yes'
  • Change the view style to node, full node render
  • Change the number of items to display to one
  • Add a sort by node post date descending
  • Add a new page view with the dropdown menu at the bottom on the left
  • Set the path of this page view to something like 'front-page'
  • Save the view
  • Go to admin > site configuration > site information
  • In the field that says default front page, change from 'node' to 'front-page' or whatever path you used above
  • Save. This view will now be used to produce the front page.

Hope those instructions are clear enough.

Finbarr

bmblack’s picture

That worked, but not EXACTLY the way I was hoping. I was able to make the INFORMATION display with your method, but it displayed as plain text, unformatted.

**side note - I was not very familiar with Views, but after tinkering around doing the things you suggested, I realized that is a very cool, powerful module! so thanks for that.**

For my blog though, I would ideally like the home page to look exactly the same as it would if I were to click on the individual blog post.

For example: if you're looking at the list of blog posts and you click on the "read more" link on one of them, it brings you to a page that only displays that one post. The posts have nice big formatted titles and below each post, there are a few buttons - "comment", "view (username)'s blog", and my little "AddToAny" button is there.

I want my home page to look like this. I know I could get this effect by manually entering the individual blog entry's URL, but I'd like to just have the page automatically re-populate.

ophelia’s picture

You're a genius, Finbarr! So easy - thanks!

profjk’s picture

1. Set teaser length to "unlimited".
2. Set posts per page to 1.
3. While posting, promote to front page.
You are good to go with these settings.
Good luck.

bmblack’s picture

The method profjk suggested worked EXACTLY as I wanted it to for my homepage. My homepage looks perfect now =)

But... I want those setting to be applied ONLY to my home page. I would still like to be able to click on the "(username)'s blog" link and view a page with 5-10 old blog posts on the same page.

Anybody have anymore suggestions?

aklouie’s picture

Use the first suggestion which is a view. Make the view a block and have the block visibility on only page 1 in the main content area. Reset your default post settings to 5-10 or whatever you want.

mdlueck’s picture

Now I get the best of both worlds... "A Drupal homepage able to display static content along with the latest blog post."

Finbarr’s picture

Have you definitely configured the view to render the node as a full node and not a teaser? Where it says 'Row Style: Node' on the left hand side, press the little cog/configuration icon to the right of this. Make sure that the select box for build mode is full node and check the box that says display links (and optionally, display comments if you want that). Don't change the site wide settings for the teaser length, put that back to the way it was.

Finbarr

bmblack’s picture

That worked!

I have one last question... how to i JUST display the blog post? I do not want the comments to appear on this particular page.

If users want to see the comments, they just click on the blog's title and it brings you to the blog page.