Adding a Gallery to a Theme with "Blocks"

One of our clients got in touch with us because he was having trouble adding the gallery to a theme with predefined template "blocks". Such themes are very easy to get started with but in general we do not recommend them because it becomes quite difficult to add any kind of dynamic functionality, such as November Gallery. In fact, please keep in mind that November Gallery is NOT compatible with custom content blocks provided by such "creator" themes (for example the Ketikidis Creator Theme). If you wish to use such a theme, please do not purchase November Gallery because it will not be compatible. This is a limitation of OctoberCMS and the given theme, and there is nothing we can do about it.

If you are adamant about using a creator theme as well as NovemberGallery, then you may find some pointers in the email we sent to our client below...

Hello, could you help me with November Gallery integration to Ketikidis Creator theme? Ketikidis Creator Theme use a content blocks. Your plugin tutorial have a comment "Again, unfortunately, that's not how October works. You can only add "Snippets" to "Static" "Pages", not "Content" blocks." May i have another way to integrate your plug-in? Thank you in advance!
~ Dmitrij

Hi Dmitrij,

I investigated your situation...

Your other problem is that you are trying to use the plugin inside of the "content blocks" available with the Ketikidis Creator Theme. Unfortunately, it is not possible to use components inside of such content blocks. This is a limitation of OctoberCMS and the Ketikidis Creator Theme, and there is nothing I can do about it.

However, you have some options.

Option #1) The main problem is that the Ketikidis Creator Theme "hides" the "Content" tab of "Pages Pages" as shown here:

(by "Pages Pages" I mean the Pages area underneath the Pages menu as shown here, as opposed to the "Pages" you can see under the "CMS" header)

This is unfortunate because you could use the gallery components here as described in the NovemberGallery help docs.

So my first recommendation would be to get in touch with the author of the Ketidis Creator Theme and ask him to put an option in the theme to unhide the Pages-Pages "Content" tab. You could then easily drag-and-drop any snippet there, and it would show up underneath the "Blocks" generated by the Ketidis theme.

Option #2) If you are unable to get help from the author of the Ketidis Theme, then you can still use the gallery plugin but it is not simple. In fact you have two options.

Option #2a) Create copies of the "static.htm" layout and add the gallery to the layout file. Then, in the Pages-Page where you want that gallery shown, select the given layout. Here I show you how:

   1) First I installed the "Duplicate" plugin by Sozonov Alexey, this adds a little button to CMS pages with which you can create copies of a page. So you don't need to do this, I already added this plugin to your site.

   2) Go to CMS → Layouts → static.htm, and create a copy of it:



Go back to "Layouts" and you should see the copied layout with a funky name:


Open it, rename it, and add whatever gallery component you want to add to it and configure it as you need. Make sure to drag-and-drop the component right after the following lines:

<!-- Page -->
{% page %}

so drag it here:


configure the gallery:

give the layout a useful name as well as a description:

and save it.

Then, find the "Pages Page" where you want to use it, and change it to use this layout. For example, I changed your "Portfolio - Gallery" page to use this layout:

You can then click "Preview" to see it.

Option 2b: The above method is not ideal because you are hard-coding the gallery into the layout page. Another option is to create regular "CMS" Pages, add the gallery components there, and then add them to your menu. The drawback of this method is that you cannot use the "blocks" provided by the Ketidis theme. Here is how you would do it:

   1) go to CMS → Pages and create a new page

I created two examples for you to follow:

Just drag-and-drop whichever component you need here.

You will have to manually add any "header" or "link" or other HTML you want to show on the page.

You can then add the page to your menu:

go to Pages → Menus and select the menu (like Main menu)

Add a new menu item and select "CMS page" as the type:


and select the page from the "Reference" field.

I added the above two demo pages to your "Main menu", you can check it out on your site:

The hub works as well because I set the "Link URL" to "/galleries/%slug%" on the Gallery Hub component:


and named the URL of the other example page to be "/galleries/edgaras-ir-iveta":


if you click the first picture on the gallery hub page:

it takes you to that gallery page.


Dmitrij, I hope the above is helpful. I recommend you try and contact the author of the Ketidis theme as I described in option #1. But the other two options should work as well.

Good luck with your site!

Laszlo Lieszkovszky,
ZenSoft Hungary

Hello, Laszlo
Thank you very much for help, investigation and detailed problem description.
I understand everything, but galleries must be administered by a client, and it will be difficult.
Well, at night I remembered the option "Gallery in Blog". And November Gallery plug-in is working perfectly with blog pages;)
Blog administration will be easy for the client...
Thank you again for your support!
No Comments
Back to top