Разработка сайта на 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 = "Blog"
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 дней |







