PHPackages                             marionnewlevant/mega-merge - 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. [Templating &amp; Views](/categories/templating)
4. /
5. marionnewlevant/mega-merge

ActiveCraft-plugin[Templating &amp; Views](/categories/templating)

marionnewlevant/mega-merge
==========================

Merge this that and the other... With twig parsing

2.0.0(3y ago)1113MITPHP

Since Feb 3Pushed 3y ago1 watchersCompare

[ Source](https://github.com/marionnewlevant/craft-megamerge)[ Packagist](https://packagist.org/packages/marionnewlevant/mega-merge)[ RSS](/packages/marionnewlevant-mega-merge/feed)WikiDiscussions v2 Synced 4w ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

MegaMerge plugin for Craft CMS 4.x
==================================

[](#megamerge-plugin-for-craft-cms-4x)

MegaMerge: mergeMegaMerge provides a fieldtype which is a Craft table with predefined `Key` and `Value` columns. It lets you merge together those fields with php arrays and twig arrays, and then look up values of keys in the merged array. The resultant values are parsed as twig.

This is a general purpose utility, though one of its potential uses (and the one for which I wrote it) is as a do-it-yourself seo system.

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 4.0.0 or later.

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

[](#installation)

1. Install with Composer via `composer require marionnewlevant/mega-merge` from your project directory
2. Install plugin in the Craft Control Panel under Settings &gt; Plugins

or

1. Install via the Plugin Store

MegaMerge Overview
------------------

[](#megamerge-overview)

MegaMerge provides a fieldtype (a key/value table) and three functions:

`craft.megaMerge.init()` is passed an array of key/value pairs (elements in this array can be megaMerge fields, php arrays, or twig arrays), and a context object. It adds the key/value pairs to a global collection of key/value pairs, and the context object to a global context object.

`craft.megaMerge.reset()` sets the global key/value pairs and the global context to empty.

`craft.megaMerge.value(key)` looks up the value associated with key in the key/value pairs, interprets it as twig using the global context, and retuns the parsed value. It returns `null` if there is no matching value.

Using MegaMerge
---------------

[](#using-megamerge)

**The key/value pairs** A megaMerge field called `globalSettings` in the `g_configuration` global set:

[![megaMergeField](docs/megaMergeField.png)](docs/megaMergeField.png)

Settings defined in config/custom.php:

```
'megaMerge' => [
    'title' => 'MySite page',
],
```

**Calling `init`** The `globalSettings` values will override the `config.general.megaMerge` ones:

```
{% do craft.megaMerge.init([
    craft.app.config.custom.megaMerge,
    g_configuration.globalSettings
  ], {object: entry}) %}
```

**Calling `value`**

```
{{ craft.megaMerge.value('title') }}
```

Brought to you by [Marion Newlevant](http://marion.newlevant.com). Icon insides by [Dmitry Baranovskiy from the Noun Project](https://thenounproject.com/term/merge/5026/)

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~490 days

Total

4

Last Release

1279d ago

Major Versions

v1.x-dev → 2.0.02023-02-12

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/695477?v=4)[Marion Newlevant](/maintainers/marionnewlevant)[@marionnewlevant](https://github.com/marionnewlevant)

---

Top Contributors

[![marionnewlevant](https://avatars.githubusercontent.com/u/695477?v=4)](https://github.com/marionnewlevant "marionnewlevant (3 commits)")

---

Tags

cmsCraftcraftcmscraft-pluginmegamerge

### Embed Badge

![Health badge](/badges/marionnewlevant-mega-merge/health.svg)

```
[![Health](https://phpackages.com/badges/marionnewlevant-mega-merge/health.svg)](https://phpackages.com/packages/marionnewlevant-mega-merge)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

101400.6k78](/packages/verbb-formie)[mmikkel/retcon

Powerful Twig filters for mutating and querying HTML

80187.1k12](/packages/mmikkel-retcon)[verbb/hyper

A user-friendly links field for Craft.

24153.5k14](/packages/verbb-hyper)[verbb/vizy

A flexible visual editor field for Craft.

4251.5k1](/packages/verbb-vizy)[wbrowar/guide

A CMS Guide for Craft CMS.

6154.7k1](/packages/wbrowar-guide)[verbb/events

A full-featured plugin for event management and ticketing.

2312.1k](/packages/verbb-events)

PHPackages © 2026

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