Recent OctoberCMS technical notes
Add extra fields to User model or other model
Sometime you need to add extra fields to a model.
by Pierre-André Vullioud
Advanced repeaters in Static Pages plugin
RainLab Static Page plugin allow you to create simple custom fields and good news : advanced repeaters are also supported ! but they needs a few lines of code for work properly
by Christophe Vuagniaux
Convert your model data from SimpleTree to NestedTree
A simple script to make your existing data compatible with NestedTree trait
by Christophe Vuagniaux
How to add input masks to the backend
jquery.inputmask is a jQuery plugin which create an input mask. An inputmask helps the user with the input by ensuring a predefined format. Follow this tutorial
by Pierre-André Vullioud
Backend - Display error messages before model fields
By default in the backend, when a model is saved and trigg errors you get the first error message displayed on the flash message. This work very nice for small forms. For big forms with many validations rules it's not the best behavior.
by Christophe Vuagniaux
Get current user
Get current user in frontend and backend of OctoberCMS
by Pierre-André Vullioud
Slug duplicated with soft trashed items
Make Sluggable trait work with soft deleted items without MySQL Integrity constraint violation.
by Christophe Vuagniaux
Customize email verification for CampaignManager
One thing that doesn't look very "pro" with the Responsiv CampaignManager plugin are the "verification" and "unsubscribe" confirmation pages which are just a message on a blank page. Fortunately there is a way to change them.
by Pierre-André Vullioud
Cron without command line
In a perfect world, all your clients will be on great host and on VPS server. But we had to deal also with crappy host that only provide fake cron job. They call a public https/http url every X min
by Pierre-André Vullioud
HTTPS & .htaccess
How to redirect http to https for an apache server with .htaccess
by Pierre-André Vullioud
Render the content of subpages
If you are building a onepage template with octoberCMS, it is a good idea to manage blocks with the Page plugin. But how can you render them on the final page without losing snippet functionality ?
by Pierre-André Vullioud
Generate Thumbnails
OctoberCMS provide a great way to manage thumbnails.
by Pierre-André Vullioud
Allow user to change avatar on their profile page
Use the nesti-uploader plugin to allow your user to change their avatar from the profile page.
by Pierre-André Vullioud
Constant strings that you can use on every pages
On most websites you have common strings that need to be edited easily by the client.
by Pierre-André Vullioud
Wysiwyg editor for RainLab Blog component
Default RainLab plugin use BlogMarkdown as editor. For non technician users, I prefer to use the regular editor.