Blog
There is a little bit of work involved in setting up a blog component:
- First, create a new blog module from the module template, “Blog template.” You can simply call your new module, “Blog,” and allow entities.
- The first thing you will want to do is set up the module correctly. So in the box in the top right labeled “Module Controls,” do the following:
- Make sure the box next to Can Have Entities is checked.
- Set the Entity Type to Article
- Check the box for Publish RSS Feed.
- Check the box for Allow Subscriptions?
- Check the box for Allow Comments?
- Do not check the box for Use Article Collection if empty?
- For the default sort order, you will always want the most recent blog to show up first on the page, so set the first dropdown to Post Date and the second dropdown to Descending/Reverse.
- Hit Save Changes for the module to save these settings.
- This will automatically include the following components:
- *** For Email Distribution ***: Used to send out notifications for new blog posts.
- Blog Intro: This will go on the main blog page and include intros for each post and links to the full posts.
- Detail: This formats the full blog post pages.
- Subscribe: This allows users to sign up for your blog. Be sure to go into the Subscribe component and mark it as a form for it to work correctly.
- Now we create the pages:
- You are going to need two different pages: Blog and Unsubscribe. You MUST call the pages by these exact names or the code that has been written in the components won’t work correctly.
- Blog page
- On the Blog page, add the Blog module with the Blog Intro component and save the page.
- Now click on the module you just added to select it, then click on the pencil icon in the flyout menu. Click on the Attributes tab.
- Add a new attribute. In the first box type “showpagination” (no quotes) and in the second box type “true”
- Add a new attribute. In the first box type “limit” and in the second box type “10”. This limits the number of blog intros that will show before pagination shows at the bottom of the page to go “next.” Ten is not a firm number, but you probably don’t want to go any higher than that or the site visitor will scroll forever. Less than ten is fine.
- Add a new attribute. In the first box type "detailcomponent" and in the second box type "detail". This will pull the code from the detail component once a blog intro is clicked on and you can view the full article.
- Add a new attribute. In the first box type "allowcache" and in the second box type "false".
- Save the page.
- Unsubscribe page
- There is an unsubscribe link at the bottom of every email notification that allows users to remove themselves from the list. When that link is clicked, it will look for a page on the site called Unsubscribe, so that is where this comes into play. We can style the page however we like, and even keep it as simple as just writing a message that we are sorry to see them go. You could also create a cute graphic. Please just be sure that this page is styled and active so site visitors can unsubscribe and not receive an error message.
- Blog Subscription Successful page. Include a success message letting the user know they subscribed to the blog.
- Add CSS to main stylesheet and tweak as needed.
Adding a Blog Post
In order to add a blog post, go to the module and add a new entity.
- Blog Article Text: This will be the main body of the article
- Blog Introduction: This needs to be short and will show on the main blog page, then link to the full article.
- Blog Title: The blog title
- Post Date: The date of the blog post. It will not show on the site until this date, and the posts are also sorted with the most recent date on top.
Sending Out Blog Notifications
We don’t currently have a way to send out notifications automatically when a post is made, so they must be sent manually.
- Find the article you would like to send a notification for, and click on Distribute to the right.
- This will bring up a new window.
- In the Component dropdown box select *** For Email Distribution ***
- Enter whatever you would like in the Subject line, something like “Latest Blog Post” or the title of the post.
- Click Distribute Article.
Subscriptions
You can manually add or remove someone from the distribution list from the Subscriptions tab. Users that have unsubscribed will still show in the list, but they will not be active and will not receive notifications.
Configuration
If you need to configure a blog to have an RSS feed, the following fields need to be used in the module configuration for it to show properly in an RSS reader.
title
category
description
body