187

Product support

Visit this product's website for support.

Categories

When you need to show popup (or inline) notices, announcements or other messages to the web site visitors.

With this plugin you can:

  • Create messages with richtext content
  • Organize them with categories
  • Set active state
  • Set visibility with dates from/to
  • Allow appearance on selected URLs only
  • Control visibility by cookie so popup will not show again when users hide it (but you can force it for selected URLs)
  • Translate content with Rainlab Translate plugin

By default this plugin uses Bootstrap modal window to show active messages but you can choose a plain HTML design (in plugin's settings). Or easily create your own code.

Default modal window with messages

Small Messages

Simple plugin to manage frontend and backend messages

Installation

GitHub clone into /plugins dir:

git clone https://github.com/jan-vince/smallmessages

OctoberCMS backend

Just look for 'Small Messages' in search field in:

Settings > Updates & Plugins > Install plugins

Permissions

Settings > Administrators

You can set permissions to restrict access to Settings > Small plugins > Small Messages and to messages list.

Quick start guide

  • Install plugin.

  • Go October's backend Settings and choose Small Messages.

    • Select your prefered UI style and optionally add Close button's text.
  • Go October's backend and choose Messages from main menu.

    • Create new Message and set it as Active (you can also set dates from/to and choose to control messages window by cookie).
  • Go to CMS part of October.

    • Add new o use existing Layout, Page or Partial.
    • Add component Small Messages > messages (inside of your body tag).

Do not forget to add {% scripts %} tag to your layout page just before closing body tag! More info in October docs.

  • Open your website - message should be visible.

Components

Messages

Should be used in your Layout, Page or Partial.

Visibility

You can set date from and/or date to if you want to control when a message box should appear on your web site.

Restrictions

You can add list or (relative) URLs where message box should appear.

Cookies

You can add a cookie control (with custom expiration) so when a user click Hide button, message box will not appear again (until a cookie expires).

You can add URLs where message box will appear even with cookie (eg. useful for /contact page).

Manually disable messages box

If you need to hide Messages box on specific Partial, Page or Layout, you can use View Bag on your Page this way:

[viewBag]
hideMessagesBox = 1

HOWTO

Get list of messages

With component attached you can get messages list by {{ messages.items }}.

Your custom messages box design

If you want your custom messages box design just create folder and file messages in /themes/[your-theme-name]/partials/messages/default.htm and put your code.

If you changed default alias of Messages component (which is messages) you have to change also folder name!

For default code you can look in /plugins/janvince/smallmessages/components/messages.


My thanks goes to:
OctoberCMS team members and supporters for this great system.
Possessed Photography for banner photo.
Font Awesome for nice icons.

Created by Jan Vince, freelance web designer from Czech Republic.

1.2.7

Added support for OCv3

Dec 19, 2023

1.2.6

Changed Twig function name to smSettingsGet

Mar 21, 2021

1.2.5

Updated messages component templates

Mar 01, 2021

1.2.4

Added support for Rainlab.Translate plugin

Feb 27, 2021

1.2.3

Fixes columns type (in Categories)

Feb 27, 2021

1.2.2

Fixed column type

Feb 27, 2021

1.2.1

Fixes compoment properties

Feb 26, 2021

1.2.0

Added option to show messages on specific pages only and to force on cookie's controlled

Feb 26, 2021

1.1.0

Added czech language

Feb 26, 2021

1.0.0

First version of Small Messages

Feb 25, 2021