October CMS – tips and tricks

September 2016
M T W T F S S
« Jul    
 1234
567891011
12131415161718
19202122232425
2627282930  

Categories



Why on earth would I use Wordpress for websites when I have October? https://t.co/48Lz41R6At
See all Twitter updates
Posted by Filip Pacurar on

[Plugin Feature] Two Factor Authentication

Have you ever wanted to add an extra layer of authentication to your October website? You can do this now by installing this plugin and enabling Two Factor Authorization. After instalation, you have to go to the settings and configure this plugin to use the desired gateway or driver and then enable Two Factor Authorization. When this plugin is active, every user has an option in My Account page to [...]

Read Article 2 Min Read backend plugins

Posted by Filip Pacurar on

Package review – Oc-jsonable

Browsing Packagist, I came upon an interesting package for October that allows you to save some fields to a single column in json format. This package is reg2005/oc-jsonable. This widget the alternative to a widget ‘Repeater’ allows to write data to jsonable field also as well as ‘Repeater’, but does not give the chance to do repetitions of fields. This package works almost like the repeater feature in October, but there is only one main difference: the fields do not repeat. This helps you to save data into the database into a single field (for example some meta fields that are different […]

Read Article 1 Min Read backend

Posted by Filip Pacurar on

After almost an year of silence, we are back

After an year since we launched this blog, October stable version was released. We still believe that this is an helpful blog for the October community so we start our activity from this day. Write on Octo-help Do you think that you can write on this blog? Write us an email at [email protected] with your intention. We can chat there.

Read Article 1 Min Read Bla Bla's

Posted by Filip Pacurar on

Why on earth would I use WordPress?

This week I just lost a client. I was supposed to do a simple job – get an existing html site and make two pages password protected with user login and admin approval of new users. This seemed to me easy enough to complete the job in just one or two hours. But look what happened: I told the client that I could work on this website only the next day. That’s when he told me he needed the [...]

Read Article 3 Min Read Bla Bla's

Posted by Filip Pacurar on

Builder for October is near!

Hello guys, how are you? I’ve been pretty busy, but now I will start to write more around here. Many of you know that one of the best features in October will be the Builder idea. This is part of October’s philosophy since the start of the project. Basically, this will help you build rapid user interfaces in the October back-end – forms, migrations, models and so on. Two days ago, the devs published a new video to tease us and show how the Builder would look like. As you can see, it will be pretty easy to create rapid […]

Read Article 1 Min Read backend

Posted by Filip Pacurar on

How to use the media manager in your plugins

The media manager is one of the best features of October CMS. Sometimes you want to use it in your plugins to pick files or upload them. Let’s quickly see how to do that. Code available on Github – octohelp/picker Create a new plugin for this tutorial: [crayon-57ecb718d1517126889169-i/]  and then create a controller for this: [crayon-57ecb718d1520391526611-i/] . Now we have all the [...]

Read Article 1 Min Read backend javascript

Posted by Filip Pacurar on

How to use the new Import and Export feature in October

In the 284 build of October CMS, developers can implement a new feature to their plugins respectively to the controllers and models in their plugins – importing and exporting data in CSV format. The interface looks like this: So, you have an plugin and you want to add this functionality? The process is simple enough – implement a new model, add the configuration and create two new models [...]

Read Article 4 Min Read backend

Posted by Michael Dibbets on

[HOWTO] USE A DIFFERENT PRIMARY KEY THAN ‘ID’ IN A MODEL OR CONTROLLER

Say you have a database table that has a different primary key than the standard id. Let’s say it’s named  customer_number To make sure everything works as usual for this you have 3 locations to keep in mind for the primary key to function properly: The model The config_form.yaml The config_list.yaml In the model you need to add the variable $primaryKey

In config_list.yaml you have the variable recordUrl:  that needs changing. Default this has :id  appended behind it. You need to change :id  to your primary key name

in config_form.yaml you have the variable redirect:  under create:  There too you need to change out […]

Read Article 1 Min Read backend

Posted by Michael Dibbets on

[HOWTO] HOW TO SET THE TABINDEX IN BACKEND FORM FIELDS?

If you want to set the tabindex on the form fields you defined in your backend plugin you need to use the attributes value in fields.yaml Read about possible form settings at https://octobercms.com/docs/backend/forms#form-field-options How to use it?

This will translate into something like this in HTML. Actual output may vary with different settings that are made: <input type="text" name="Model[fieldname]" id="Form-field-Model-fieldname" value="Something" placeholder="" class="form-control" autocomplete="off" maxlength="255" tabindex="1"> And now you can set all the tab-indexes to your hearts content and make your forms more production friendly.

Read Article 1 Min Read Uncategorized

Posted by Michael Dibbets on

[HOWTO] HOW TO DELETE ITEMS FROM A LIST AND FORCE A LIST REFRESH AFTER DELETION.

To delete an item, from a list you need a button that will allow you to delete it. I place this one in authorname\pluginname\controllers\controllername\_list_toolbars.htm

In authorname\pluginname\controllers\controllername\config_list.yaml we allow checkboxes

Then in the controller we add the following function to actually delete what we want to delete. Please note the relation between the button and the function name in the controller. In the button we have <button ...... data-request="onDelete">  and in the controller we have  public function onDelete()   This is where a press on that button will pass to the ajax call to. If you want any fun you put onMyChimichangas instead of onDelete. You […]

Read Article 1 Min Read backend