Розробка вебсайту на CMS October CMS
October CMS — це PHP CMS на базі Laravel, випущена у 2014 році. Версія 3 повністю перероблена: сучасний Laravel 10+, Composer-установка, Tailwind у інтерфейсі. Підтримує як класичні PHP-шаблони, так і headless-режим через API.
Коли вибирати October CMS
October CMS добре підходить, коли команда знає Laravel. Плагіни — це Laravel-пакети з використанням Eloquent, Blade, Events. Вбудовані інструменти: Tailor (гнучкий content builder), Builder (генерація плагінів через UI), RainLab-плагіни (Blog, Users, Pages, Translate).
Архітектура
october-project/
├── themes/
│ └── mytheme/
│ ├── theme.yaml
│ ├── layouts/
│ │ └── default.htm
│ ├── pages/
│ │ ├── index.htm
│ │ └── blog-post.htm
│ ├── partials/
│ │ ├── header.htm
│ │ └── footer.htm
│ └── assets/
├── plugins/
│ └── mycompany/
│ └── mysite/ # кастомний плагін проекту
├── config/
└── storage/
Структура сторінки (.htm файл)
title = "Блог"
url = "/blog"
layout = "default"
is_hidden = 0
[blogPosts posts]
posts_per_page = 12
category_filter = ""
sort_order = "published_at desc"
==
{% put styles %}
<link rel="stylesheet" href="{{ ['~/assets/css/blog.css'] | theme }}">
{% endput %}
<div class="blog-listing">
{% for post in posts %}
{% partial "blog/post-card" post=post %}
{% endfor %}
{% if posts.lastPage > 1 %}
{% partial "pagination" items=posts %}
{% endif %}
</div>
Tailor: гнучкий контент без плагінів
Tailor (October 3+) — вбудована система моделювання контенту, аналог ACF в WordPress:
# blueprints/blog.yaml
uuid: a6e3a3c4-9d1f-4a1e-b9d2-d7c8e8f1a2b3
handle: Blog\Post
type: entry
fields:
title:
label: Заголовок
type: text
required: true
slug:
label: Slug
type: text
preset:
field: title
type: slug
content:
label: Вміст
type: richeditor
featured_image:
label: Головне зображення
type: fileupload
mode: image
imageWidth: 1200
imageHeight: 630
category:
label: Категорія
type: entries
source: Blog\Category
maxItems: 1
published_at:
label: Дата публікації
type: datepicker
mode: datetime
Компоненти
Компоненти — основна одиниця логіки в October CMS. Інкапсулюють дані для шаблону:
// plugins/mycompany/mysite/components/LatestPosts.php
namespace MyCompany\MySite\Components;
use Cms\Classes\ComponentBase;
use MyCompany\MySite\Models\Post;
class LatestPosts extends ComponentBase
{
public function componentDetails(): array
{
return [
'name' => 'Latest Posts',
'description' => 'Displays the latest blog posts',
];
}
public function defineProperties(): array
{
return [
'limit' => [
'title' => 'Number of posts',
'type' => 'string',
'default' => '6',
'validationPattern' => '^[0-9]+$',
],
];
}
public function onRun(): void
{
$this->page['posts'] = Post::published()
->with('featured_image', 'categories')
->orderBy('published_at', 'desc')
->limit((int) $this->property('limit'))
->get();
}
}
Терміни розробки
| Етап | Час |
|---|---|
| Встановлення + тема + базові сторінки | 1–2 дні |
| Tailor blueprints (5–8 типів) | 1–2 дні |
| Компоненти та логіка | 2–4 дні |
| Шаблони та вёрстка | 3–7 днів |
| Плагіни (Blog, Users, SEO) | 1–2 дні |
| Корпоративний сайт | 10–15 днів |







