#2

Product support

Visit this product's website for support.

Categories

  • Marketing

A simple, extensible blogging platform for October CMS.

Editing posts

The plugin uses the markdown markup for the posts. You can use any Markdown syntax and some special tags for embedding images and videos (requires RainLab Blog Video plugin). To embed an image use the image placeholder:

![1](image)

The number in the first part is the placeholder index. If you use multiple images in a post you should use an unique index for each image:

![1](image)

![2](image)

You can also add classes or ids to images by using the markdown extra syntax:

![1](image){#id .class}

Excerpt Vs. Read more

Posts are managed by selecting Blog > Posts from the menu. Each post can contain an excerpt by entering some text in this field on the Manage tab. This content is displayed on the page using the summary attribute of the blog post.

{{ post.summary }}

Alternatively this field can be left blank and the excerpt can be captured from the main content (Edit tab). Use the special tag <!-- more --> to specify a summary from the main content, all content above this tag will be treated as the summary. For example:

This is a great introduction to a great blog post. This text is included as part of the excerpt / summary.

<!-- more -->

Let's dive in to more detail about why this post is so great. This text will not be included in the summary.

Finally, if no excerpt is specified and the "more" tag is not used, the blog post will capture the first 600 characters of the content and use this for the summary.

Note: The HTML contents will be stripped from the summary attribute.

Markdown guide

October supports standard markdown syntax as well as extended markdown syntax

Classes and IDs

Classes and IDs can be added to images and other elements as shown below:

[link](url){#id .class}
![1](image){#id .class}
# October  {#id .class}

Fenced code blogs

Markdown extra makes it possible to use fenced code blocks. With fenced code blocks you do not need indentation on the areas you want to mark as code:

```
Code goes here
```

You can also use the ~ symbol:

~~~
Code goes here
~~~

Tables

A simple table can be defined as follows:

First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell 
Content Cell  | Content Cell 

If you want to you can also add a leading and tailing pipe:

| First Header  | Second Header |
| ------------- | ------------- |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |

To add alignment to the cells you simply need to add a : either at the start or end of a separator:

| First Header  | Second Header |
| :------------ | ------------: |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |

To center align cell just add : on both sides:

| First Header  | Second Header |
| ------------- | :-----------: |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |

Definition lists

Below is an example of a simple definition list:

Laravel
:   A popular PHP framework

October
:   Awesome CMS built on Laravel

A term can also have multiple definitions:

Laravel
:   A popular PHP framework

October
:   Awesome CMS built on Laravel
:   Supports markdown extra

You can also associate more than 1 term to a definition:

Laravel
October
:   Built using PHP

Footnotes

With markdown extra it is possible to create reference style footnotes:

This is some text with a footnote.[^1]

[^1]: And this is the footnote.

Abbreviations

With markdown extra you can add abbreviations to your markup. The use this functionality first create a definition list:

*[HTML]: Hyper Text Markup Language
*[PHP]:  Hypertext Preprocessor

Now markdown extra will convert all occurrences of HTML and PHP as follows:

<abbr title="Hyper Text Markup Language">HTML</abbr>
<abbr title="Hypertext Preprocessor">PHP</abbr>

Implementing front-end pages

The plugin provides several components for building the post list page (archive), category page, post details page and category list for the sidebar.

Post list page

Use the blogPosts component to display a list of latest blog posts on a page. The component has the following properties:

  • pageNumber - this value is used to determine what page the user is on, it should be a routing parameter for the default markup. The default value is {{ :page }} to obtain the value from the route parameter :page.
  • categoryFilter - a category slug to filter the posts by. If left blank, all posts are displayed.
  • postsPerPage - how many posts to display on a single page (the pagination is supported automatically). The default value is 10.
  • noPostsMessage - message to display in the empty post list.
  • sortOrder - the column name and direction used for the sort order of the posts. The default value is published_at desc.
  • categoryPage - path to the category page. The default value is blog/category - it matches the pages/blog/category.htm file in the theme directory. This property is used in the default component partial for creating links to the blog categories.
  • postPage - path to the post details page. The default value is blog/post - it matches the pages/blog/post.htm file in the theme directory. This property is used in the default component partial for creating links to the blog posts.

The blogPosts component injects the following variables to the page where it's used:

  • posts - a list of blog posts loaded from the database.
  • postPage - contains the value of the postPage component's property.
  • category - the blog category object loaded from the database. If the category is not found, the variable value is null.
  • categoryPage - contains the value of the categoryPage component's property.
  • noPostsMessage - contains the value of the noPostsMessage component's property.

The component supports pagination and reads the current page index from the :page URL parameter. The next example shows the basic component usage on the blog home page:

title = "Blog"
url = "/blog/:page?"

[blogPosts]
postsPerPage = "5"
==
{% component 'blogPosts' %}

The next example shows the basic component usage with the category filter:

title = "Blog Category"
url = "/blog/category/:slug/:page?"

[blogPosts]
categoryFilter = ":slug"
==
function onEnd()
{
    // Optional - set the page title to the category name
    if ($this->category)
        $this->page->title = $this->category->name;
}
==
{% if not category %}
    <h2>Category not found</h2>
{% else %}
    <h2>{{ category.name }}</h2>

    {% component 'blogPosts' %}
{% endif %}

The post list and the pagination are coded in the default component partial plugins/rainlab/blog/components/posts/default.htm. If the default markup is not suitable for your website, feel free to copy it from the default partial and replace the {% component %} call in the example above with the partial contents.

Post page

Use the blogPost component to display a blog post on a page. The component has the following properties:

  • slug - the value used for looking up the post by its slug. The default value is {{ :slug }} to obtain the value from the route parameter :slug.
  • categoryPage - path to the category page. The default value is blog/category - it matches the pages/blog/category.htm file in the theme directory. This property is used in the default component partial for creating links to the blog categories.

The component injects the following variables to the page where it's used:

  • post - the blog post object loaded from the database. If the post is not found, the variable value is null.

The next example shows the basic component usage on the blog page:

title = "Blog Post"
url = "/blog/post/:slug"

[blogPost]
==
<?php
function onEnd()
{
    // Optional - set the page title to the post title
    if (isset($this->post))
        $this->page->title = $this->post->title;
}
?>
==
{% if post %}
    <h2>{{ post.title }}</h2>

    {% component 'blogPost' %}
{% else %}
    <h2>Post not found</h2>
{% endif %}

The post details is coded in the default component partial plugins/rainlab/blog/components/post/default.htm.

Category list

Use the blogCategories component to display a list of blog post categories with links. The component has the following properties:

  • slug - the value used for looking up the current category by its slug. The default value is {{ :slug }} to obtain the value from the route parameter :slug.
  • displayEmpty - determines if empty categories should be displayed. The default value is false.
  • categoryPage - path to the category page. The default value is blog/category - it matches the pages/blog/category.htm file in the theme directory. This property is used in the default component partial for creating links to the blog categories.

The component injects the following variables to the page where it's used:

  • categoryPage - contains the value of the categoryPage component's property.
  • categories - a list of blog categories loaded from the database.
  • currentCategorySlug - slug of the current category. This property is used for marking the current category in the category list.

The component can be used on any page. The next example shows the basic component usage on the blog home page:

title = "Blog"
url = "/blog/:page?"

[blogCategories]
==
...
<div class="sidebar">
    {% component 'blogCategories' %}
</div>
...

The category list is coded in the default component partial plugins/rainlab/blog/components/categories/default.htm.

  • Found the plugin useful on 31 May, 2017

    This is very useful plugin! Great job! But i have one question: How to show image (thumb) on post list?

  • Found the plugin useful on 26 May, 2017

    This is a plugin for LDAP authentication with the backend of OctoberCMS. I tried to search this feature on the market place but I haven't seen it. So, I have developed my own version and want to contribute it to the community.

    This is the first time I submit plugin to OctoberCMS market place. If any thing missing, please let me know.

    Thanks for supporting.

  • Found the plugin useful on 21 May, 2017

    For people who has issues with code section which not works: go to: /plugins/rainlab/blog/components/post/default.htm change:

    <div class="content">{{ post.content_html|raw }}</div>

    wtih:

    <div class="content"> {{ post.content_html|replace({'<pre>': '<pre class = "prettyprint">'}) |raw}}</div>

    then those add in <head> section of your theme layout:

    <link rel="stylesheet" type="text/css" href="/modules/system/assets/vendor/prettify/prettify.css">

    <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>;

    All Set

  • Found the plugin useful on 25 Apr, 2017

    great plugin. Thank!

  • Found the plugin useful on 14 Apr, 2017

    The category list is coded in the default component partial plugins/rainlab/blog/components/categories/default.htm. but i need use a different template: themes/mytheme/partials/listCategoria1.htm. how i can use it?

  • Found the plugin useful on 8 Apr, 2017

    This Plugin Helps me solve my problem. Really Nice and Helpful.

  • Found the plugin useful on 26 Mar, 2017

    Excellent plugin. With minimal configuration I was able to get the Leader Internet Blog up and running in less than 1 hour.

  • Found the plugin useful on 20 Mar, 2017

    Great theme. I recommend it.

  • Found the plugin useful on 27 Jan, 2017

    It's awesome :)

  • Found the plugin useful on 19 Jan, 2017

    Plugin is awesome, however I really would love to be able to translate attachment's title and description, when adding images.

  • Found the plugin useful on 7 Jan, 2017

    Hallo i new with this plugin, i have one question.

    -how to add comment on the blog article ?

  • Found the plugin useful on 17 Nov, 2016

    Love the plugin! Thank you so much. Question: is there an app that would allow me to post from an iPhone? Or would it support markdown apps with images? Like Simplenote app for example.

  • Found the plugin useful on 30 Aug, 2016

    Hey, its great but i have question. How i can choose some category with its subcategories, because i want that list to be on right side like some menu. i supose i have to change {% component 'blogCategories' %}....

  • Found the plugin useful on 18 Aug, 2016

    Simple for users to manage, there are many add-on plugins which compliment the Blog plugin, some should actually come built in with the standard Blog plugin, but overall it works as expected.

  • Found the plugin useful on 16 Aug, 2016

    A very useful tool. Already to go and all you have to do is follow the documentation. If you're not into reading then just follow Samuel G on his vimeo video. https://vimeo.com/97088926

  • Found the plugin useful on 7 Aug, 2016

    Very useful plugin. Good job!

    Just wondering if it is a bug that in the recent versions we can't specify a different slug param name than :slug?

    For example, if we have a blog post page with URL

    /post/:post

    and in the "Post" component we have

    slug = "{{ :post }}"

    Then the blog post page would work well. That said, the post page links generated in other pages would be incorrect.

    For example, say we have a blog category page, which uses the Post List component to display a list of posts and we specify the blog post page we just created to be the Post page, then the links generated for posts would be something like

    domain.com/post/default

    where the default should instead be the real slug of the post.

    This problem can be avoided by using :slug as the post slug param name in the Post component.

    I think this can be a bug in recent versions of the Blog plugin, because in the demo video of this plugin, there used to be 2 configurations for Post page links

    • Post page
    • Post page param name

    But now there is only Post page and we are no longer able to tell the blog category page that the slug param name for a generated post page link should be :post rather than the default :slug.

    The category page link has exactly the same problem.

    So any reason that we removed the Post page param name and Category page param name settings from Post List component?

    Thanks.

  • Found the plugin useful on 21 Jul, 2016

    Yes it's very useful, there are a couple of things missing, like butting the author in post, and putting a limit on the title so that it will show less, but otherwise after all the struggle I would have to say that it is easy to use after you lost your mind. It's easy to creat custom layouts for the posts as well. :D Great job guys

  • Found the plugin useful on 21 May, 2016

    Like much of the Rainlab stuff, their Blog plugin does the job and does it right. It was the first plugin I really investigated code-wise after my first OctoberCMS install, and it's still serving me faithfully a month into the project. Subsequent plugin selections have rarely been as trouble-free.

  • Found the plugin not useful on 1 Apr, 2016

    Hi. I have purchased form builder plugin and well.. I'm disapointed since the author based on support forum told me that I should check the update in my october instance though I was sure that I will be able to add it after buying it to the instance this or other like any other plugins available for free since well.. I bought it right? ;) That;s one issue. The other is that the instance I have bought the plugin to (connected with) is not the production one on which I would like to use it but just my playground and in this case I also feel a bit cheated since I thought that after buying this or any plugin in this case I would be able to use it in any of my projects, yet that seems not to be the case and I can't :/ Maybe you could add some comprehensive information in visible place that after buying plugin it will be availableONLY on the project which with it's connected and that there will be no option to add it to the project other than the chosen one :/ Though I would prefere that you would change the policy and made plugins which were bought available to use in any projects and set / correct the installation / plugin adding area so that it would be intuitive.

    Thank you

  • Found the plugin useful on 16 Mar, 2016

    I didn't add it to my website, but I used it to learn some best practices on how to develop a plugin the right way.

  • Found the plugin useful on 13 Mar, 2016

    I like it. It is simple to setup. How can I include image with list od recent posts?

  • Found the plugin useful on 8 Mar, 2016

    not filter my categories as in the tutorial https://vimeo.com/97088926

  • Found the plugin useful on 1 Feb, 2016

    very good plugin and documentation.

  • Found the plugin useful on 20 Jan, 2016

    very useful

  • Found the plugin useful on 10 Jan, 2016

    Must have plugin. Thanks to devs!

  • Found the plugin useful on 29 Dec, 2015

    How can I add css class like

    class="table-hover"

    to table?

  • Found the plugin useful on 22 Dec, 2015

    Very useful also to learn the concepts behind OCMS

  • Found the plugin useful on 11 Nov, 2015

    Good plugin. But I don't understand necessity of using Wiki-markdown. Isn't it more convenient to use WYSIWYG?

  • Found the plugin useful on 30 Oct, 2015

    Really simple to set up, following the video. As a developer, this hits the right balance between power and ease of use. All thumbs up!

  • Found the plugin useful on 22 Oct, 2015

    Great Plugin. Is there a way to install several copies of this plugin to add Blog posts on Spanish and Portuguese?

  • Found the plugin useful on 13 Oct, 2015

    Good. It make our writer feel better, normally we use Wordpress but it's getting much harder to maintain day by day. So we switch to OctoberCMS as it provide cleaner interface and give me better space to develop custom plugins

  • Found the plugin useful on 28 Aug, 2015

    Found this a brilliant little plugin for my site, doubt there's a better plugin available for OctoberCMS for blogging.

  • Found the plugin useful on 27 Jun, 2015

    Simple and effective. Very good plugin imho :)

  • Found the plugin useful on 26 Jun, 2015

    Yes plugin was useful and simple. Also extendable as shown by seo extension plugin.

  • Found the plugin useful on 3 Jun, 2015

    This plugin is wonderful!

  • Found the plugin useful on 3 Jun, 2015

    Great plugin, I love it, and love who make it :)

  • Found the plugin useful on 30 May, 2015

    This plugin is awesome, but I need support for Rainlab.Translate, thanks.

  • Found the plugin useful on 28 Apr, 2015

    Karlis, I would suggest that you do one of the following:

    • Create you own component and receive the post as a parameter on the default markup
    • Create partials that also receive the post as a parameter
    • Create two cms pages with uniques urls that uses the blogPost component, but without the component markup ;)

  • Found the plugin useful on 16 Apr, 2015

    How can i make custom blogPost layout? Right now i'm changing default.htm in Posts folder. Now i need two different layouts.

  • Found the plugin not useful on 21 Mar, 2015

    I dont understand how can I add a title to the article? I wan to title set automatically by the title in Database... But how can I use php code in .htm file? Or how it works? Should I make another post template? But where can I told the program, it should use my template, not default? I miss a normal documentation!!!

  • Found the plugin useful on 8 Mar, 2015

    How do i add except of the blog and featured image in a page just like that one at the bottom of the this site?

  • Found the plugin useful on 11 Feb, 2015

    I find this plugin to be excellent! Keep up the good work.

  • Found the plugin useful on 3 Jan, 2015

    CKEditor plugin works very well with blog, none of my customers had problem with it, try it out!

    The blog itself only lacks multi-level categories and slug format control to be perfect, I appreciate it very much.

  • Found the plugin useful on 16 Dec, 2014

    Great plugin! Can't wait to start posting more articles but so far I'm liking it a lot. Loving the markdown support & live view as you type. Just a little bit worried about giving clients control over their blog though. Possibly add a mini cheat sheet somewhere where they can get a glimpse of some markdown syntax? Or possibly add a basic WYSIWYG editor that just outputs the basic markdown syntax? (As much as I think it doesn't need it, I have to think about clients who write their own blog posts and might not totally understand markdown language.

    Anyway, keep up the phenomenal work, really happy so far :)

  • Found the plugin useful on 15 Dec, 2014

    Ok, i did by adding the following to the blog post page

                            {{ post.content_html|replace({'<pre>': '<pre class = "prettyprint linenums">','<code>':'','</code>':''}) |raw}}

    and then adding the prettify.js and theme css to the default layout...

  • Found the plugin useful on 14 Dec, 2014

    How can I ring fence code with the prettifier class? Thanks, Tim

  • Found the plugin useful on 1 Dec, 2014

    I love this plugin, but cen you add option for "clients" (WYSWIG Editor for content) ?!

  • Found the plugin useful on 20 Nov, 2014

    How can i change slug name from "title" to "/year/month/date/title" like blogspot? Want to use same slug name with multiple blog article.

  • Found the plugin useful on 7 Oct, 2014

    By "payout" I meant "layout"

  • Found the plugin useful on 6 Oct, 2014

    What's the best way to edit the payout that is use for generating the blog list and blog category list?

    Also in the admin, as @autumn said, there's a sql error on the filter for categories. I'll look in to that shortly.

  • Found the plugin not useful on 6 Oct, 2014

    Bugs in admin area doesn't work sort by category doesn't work filter by category

  • Found the plugin useful on 8 Sep, 2014

    Is there a way to detach the layout of the blog and get it into your own theme? I just like to receive data so I can do whatever I want with it in the layout stage.

    I don't want to edit separate files just for the blog.

  • Found the plugin useful on 4 Jul, 2014

    You can add a class to an image as follow:

    ![image](image.jpg "title" class="thumbnail")

  • Found the plugin not useful on 27 Jun, 2014

    After an update/refresh, I have lost all my posts !!! I have to repost all my articles... THX a lot -_-

  • Found the plugin useful on 4 Jun, 2014

    Hi great plugin, I just noticed that the "Author" field is being left empty on all the new blog posts on my installation. I'm currently running the latest builds

  • Found the plugin useful on 30 May, 2014

    not work

    if (isset($this['blogPost']))
            $this->page->title = $this['blogPost']->title;

    but work ```if (isset($this['post']))

        $this->page->title = $this['post']->title;

  • Found the plugin useful on 26 May, 2014

    Found this plugin very useful and easy to use.

    @Denis - Take a look at code below. I have this in code section of blog post page.

    function onEnd()
    {
        if (isset($this['blogPost']))
            $this->page->title = $this['blogPost']->title;
            $this->page->meta_title = $this['blogPost']->title;
            $this->page->description = $this['blogPost']->excerpt;
            $this->page->meta_description = $this['blogPost']->excerpt;
    }

  • Found the plugin useful on 18 May, 2014

    Hi RainLab, Prompt how to display the contents of the "Excerpt" in "meta=Description" on page post?

  • Found the plugin useful on 16 May, 2014

    How can I add css class like

    class="img-responsive"

    to images?

1.2.18

Minor change to internals. Pending

Apr 07, 2017

1.2.17

Improved the next and previous logic to sort by the published date. Pending

Apr 06, 2017

1.2.16

Added `nextPost` and `previousPost` to the blog post component.

Mar 19, 2017

1.2.15

Back-end navigation sort order updated.

Mar 02, 2017

1.2.14

Added post exception property to the post list component, useful for showing related posts.

Oct 30, 2016

1.2.13

Improved support for Static Pages menus, added a blog post and all blog posts.

Oct 20, 2016

1.2.12

Description field added to category form.

Oct 18, 2016

1.2.11

Fixes bug where excerpt is not translated.

Sep 02, 2016

1.2.10

Added translation support for post slugs.

Aug 19, 2016

1.2.9

Added translation support for blog categories.

Jul 12, 2016

1.2.8

Fixes issue with translated `content_html` attribute on blog posts.

Jul 04, 2016

1.2.7

Introduced a new RSS feed component.

Jun 10, 2016

1.2.6

The published field can now supply a time with the date.

Jun 01, 2016

1.2.5

Added translation support for blog posts.

May 25, 2016

1.2.4

Database maintenance. Updated all timestamp columns to be nullable.

Apr 29, 2016

1.2.3

Minor user interface update.

Apr 01, 2016

1.2.2

Fixes issue on new installs.

Jan 10, 2016

1.2.1

Post slugs now must be unique.

Jan 09, 2016

1.2.0

Categories now support nesting.

Jan 09, 2016

1.1.3

Added a New Post shortcut button to the blog menu.

Nov 04, 2015

1.1.2

Posts are no longer visible if the published date has not passed.

Aug 22, 2015

1.1.1

Posts can now be imported and exported.

Aug 07, 2015

1.1.0

Replaced the Post editor with the new core Markdown editor.

Aug 07, 2015

1.0.14

Add support for CSRF protection feature added to core.

Jul 03, 2015

1.0.13

Fixes problem with providing pages to Sitemap and Pages plugins.

Mar 13, 2015

1.0.12

Fixes issue where images cannot be uploaded caused by latest Markdown library.

Feb 13, 2015

1.0.11

Deprecate "idParam" component property in favour of "slug" property.

Dec 16, 2014

1.0.10

Added permission to prevent users from seeing posts they did not create.

Dec 12, 2014

1.0.9

Added support for the Sitemap plugin.

Nov 19, 2014

1.0.8

Added total posts to category list

Oct 10, 2014

1.0.7

Added support for the Static Pages menus

Oct 02, 2014

1.0.6

Featured images now appear in the Post component

Jul 12, 2014

1.0.5

Removes the Author column from blog post list

Jun 23, 2014

1.0.4

Improvements to the Posts list management UI

May 30, 2014

1.0.3

Category component has been merged with Posts component

May 30, 2014

1.0.2

Added the processed HTML content column to the posts table

Apr 27, 2014

1.0.1

Initialize plugin

Apr 04, 2014