PHPackages                             grrr-amsterdam/oc-flexiblecontent-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. grrr-amsterdam/oc-flexiblecontent-plugin

ActiveOctober-plugin[Utility &amp; Helpers](/categories/utility)

grrr-amsterdam/oc-flexiblecontent-plugin
========================================

OctoberCMS Plugin for adding flexible content to models.

v0.2.0(1y ago)12.0k2MITPHPPHP &gt;=7.2

Since Dec 13Pushed 1y ago4 watchersCompare

[ Source](https://github.com/grrr-amsterdam/oc-flexiblecontent-plugin)[ Packagist](https://packagist.org/packages/grrr-amsterdam/oc-flexiblecontent-plugin)[ RSS](/packages/grrr-amsterdam-oc-flexiblecontent-plugin/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (9)Used By (0)

Flexible Content for OctoberCMS
===============================

[](#flexible-content-for-octobercms)

Inspired by the the Advanced Custom Fields PRO plugin for Wordpress, this plugin allows you to create flexible content blocks for your OctoberCMS website. This plugin will take care of the editing part, and the rendering part.

This package also contains a [flexible model object field](#flexible-model-object-field) 'fc-model-object' for searchable select (Select2) that allows you to select a model object and use it in your flexible content block, without having an eloquent relation to the model.

Installation
------------

[](#installation)

```
composer require grrramsterdam/flexiblecontent-plugin
```

Usage
-----

[](#usage)

You can add flexible content blocks by adding them to themes/your-theme/flexible-content/groups.yaml. This is essentially the `groups` option a [repeater](https://docs.octobercms.com/1.x/backend/forms.html#repeater) field. Each group must specify a unique key and the definition supports the following options. name, description, icon en fields.

Example:

```
text:
  name: Text
  description: A simple text block
  icon: icon-align-left
  fields:
    text:
      label: Text
      type: richeditor
text_media:
  name: Text with media
  description: A text block with media
  icon: icon-align-left
  fields:
    text:
      label: Text
      type: richeditor
    media:
      label: Media
      type: mediafinder
```

Flexible model object field
---------------------------

[](#flexible-model-object-field)

With this field you can create a searchable model object field that can be used in your flexible content block. You can use this field to select a model object without having an eloquent relation to the model.

### Usage

[](#usage-1)

```
fields:
  model_object:
    label: Pick example
    type: fc-model-object
    model: Grrr\FlexibleContent\Models\ExampleModel
    nameFrom: title
    emptyOption: "Select an example item"
    # searchEndpoint: grrr/project-plugin/example-models/search-select-options
```

### Asynchronous select options

[](#asynchronous-select-options)

By default an `all()` query will be done for the model to dynamically populate the select options. But this can be a memory issue very quickly. You can specify a `searchEndpoint` option. This should be a route to an OctoberCMS backend controller that returns a JSON response with the following format:

```
{
  "results": [
    {
      "id": 1,
      "text": "Example item 1"
    },
    {
      "id": 2,
      "text": "Example item 2"
    }
  ]
}
```

This packages provides a behaviour `GrrrAmsterdam\FlexibleContent\Behaviors\HasSearchableSelectOptions`that you can use in a controller that also uses the FormController behaviour. Register it in a controller like this:

```
// [plugin path]/controllers/Examples.php

public $implement = [
    'Backend\Behaviors\FormController',
    'GrrrAmsterdam\FlexibleContent\Behaviors\HasSearchableSelectOptions',
];
```

Be the default the search query will be done on the `title` attribute of the model. You can overwrite the `getSearchableSelectOptions()` method on your controller to change this behaviour.

This behaviour will add a route to the controller with the following backend path: `{vendor}/{plugin}/{controller}/search-select-options`. You can use this path as the `searchEndpoint`option.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~349 days

Recently: every ~437 days

Total

6

Last Release

591d ago

PHP version history (2 changes)v0.0.1PHP &gt;=7.0

v0.1.1PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e9d8dbb19a130c305fcf27d971e72f9df08a31122b72ed7e8a68eaf9e35231e?d=identicon)[harmenjanssen](/maintainers/harmenjanssen)

![](https://www.gravatar.com/avatar/cf6699e100eaa1b3fb2389b044e2365fb73add031d3e91ecf6cf4507c99643a5?d=identicon)[RamiroGrrr](/maintainers/RamiroGrrr)

---

Top Contributors

[![HammenWS](https://avatars.githubusercontent.com/u/1799286?v=4)](https://github.com/HammenWS "HammenWS (7 commits)")[![martijngastkemper](https://avatars.githubusercontent.com/u/250662?v=4)](https://github.com/martijngastkemper "martijngastkemper (1 commits)")

### Embed Badge

![Health badge](/badges/grrr-amsterdam-oc-flexiblecontent-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/grrr-amsterdam-oc-flexiblecontent-plugin/health.svg)](https://phpackages.com/packages/grrr-amsterdam-oc-flexiblecontent-plugin)
```

###  Alternatives

[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/builder-plugin

Builder plugin for October CMS

17147.2k1](/packages/rainlab-builder-plugin)[pfefferle/wordpress-activitypub

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.

5671.4k1](/packages/pfefferle-wordpress-activitypub)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

18238.1k2](/packages/civicrm-civicrm-drupal-8)[mediawiki/semantic-glossary

A terminology markup extension with a Semantic MediaWiki back-end

1352.4k](/packages/mediawiki-semantic-glossary)[humanmade/lottie-lite

A lightweight Lottie Animations Extension for WordPress

374.3k](/packages/humanmade-lottie-lite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
