Alter default blog in Umbraco
When you install the blog package that comes with the installation of Umbraco, the home page of your website will contain the list of blog items you make. Since my website is not only a blog but also provides information about other things, I want to have a custom home page. In this tutorial I will show you how to change the default installation of the blog package and make your own home page.
The following steps will be described:
- Removing the default pages
- Adding a custom home page
- Adding a sub page with a list of blog items
- Adding a blog item
This tutorial continues from the installation described in the previous blog item Installing Umbraco on localhost.
Removing default pages
Go to the administrator area of your Umbraco installation by adding /umbraco/default.aspx to the base url. Next log in and go to the "content" section by clicking the content button on the left bottom of the screen.
Next remove the default generated pages by right-clicking the blog folder en selecting "delete".
Confirm the action and the Blog directory is deleted.
Adding the home page
Now right-click the content folder in the top of the content tree and click create.
Type "Home" in the name field and select "Blog" as content type. This will be the "home page"
The new content will open in edit mode. Type some text and click the "save and publish" button in the top right corner of the toolbar.
Adding a new blog
Now create another content item:
and call this Blog. Select Text page as content type. This will be the page where the blog items are shown.
The new text page will open in edit mode. To show the blog items you need to add a macro to the text area. Macros are pieces of extra functionality to Umbraco. In my next blog post I will explain more about this.
Add a macro by clicking "insert macro" on the right of the toolbar.
Select "Blog list posts" and click "OK".
Don't forget to hit the "save and publish" button to save the changes of this page.
Create a blog item
Again, create new content:
Select "Blog post" as content type. Also type a nice name for this first blog item.
Type some text and add a tag. Hit "save and publish" to publish the new blog post.
Now click in the folder tree the blog page. That is the page where you just inserted the blog list macro. When the page opens you will see a preview of your just added blog post.
That's it! Check the front of your website and you will see your changes.
The home page:
and the blog list page:
See my next post about how to change the way the blog list looks.