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.0k2[1 PRs](https://github.com/grrr-amsterdam/oc-flexiblecontent-plugin/pulls)MITPHPPHP &gt;=7.2

Since Dec 13Pushed 2mo 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 3w ago

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

38

—

LowBetter than 83% of packages

Maintenance63

Regular maintenance activity

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity48

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

645d ago

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

v0.1.1PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/803176?v=4)[Harmen Janssen](/maintainers/harmenjanssen)[@harmenjanssen](https://github.com/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

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[mautic/core

Mautic Open Source Distribution

10.0k2.6k9](/packages/mautic-core)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)[starcitizentools/citizen-skin

A beautiful, usable, responsive MediaWiki skin with in-depth extension support. Originally developed for the Star Citizen Wiki.

3376.6k](/packages/starcitizentools-citizen-skin)[civicrm/civicrm-drupal-8

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

19251.4k3](/packages/civicrm-civicrm-drupal-8)[altis/core

Core module for Altis

19228.0k3](/packages/altis-core)

PHPackages © 2026

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