PHPackages                             nystudio107/eagerbeaver - 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. nystudio107/eagerbeaver

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

nystudio107/eagerbeaver
=======================

Allows you to eager load elements from auto-injected Entry elements on demand from your templates.

1.0.1(8y ago)251.5k1PHP

Since Sep 27Pushed 7y ago2 watchersCompare

[ Source](https://github.com/nystudio107/eagerbeaver)[ Packagist](https://packagist.org/packages/nystudio107/eagerbeaver)[ RSS](/packages/nystudio107-eagerbeaver/feed)WikiDiscussions master Synced today

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

[![No Maintenance Intended](https://camo.githubusercontent.com/d904056147052e22d8e1c7f46bb50293ed2aeb4c43ead9a2d0cf7a48b46d0562/687474703a2f2f756e6d61696e7461696e65642e746563682f62616467652e737667)](http://unmaintained.tech/)

DEPRECATED
==========

[](#deprecated)

This Craft CMS 2.x plugin is no longer supported, but it is fully functional, and you may continue to use it as you see fit. The license also allows you to fork it and make changes as needed for legacy support reasons.

The Craft CMS 3.x version of this plugin can be found here: [craft-eagerbeaver](https://github.com/nystudio107/craft-eagerbeaver) and can also be installed via the Craft Plugin Store in the Craft CP.

Eager Beaver plugin for Craft CMS
=================================

[](#eager-beaver-plugin-for-craft-cms)

Allows you to eager load elements from auto-injected Entry elements on demand from your templates.

[![Screenshot](resources/screenshots/beaver.png)](resources/screenshots/beaver.png)

Related: [Eager Beaver for Craft 3.x](https://github.com/nystudio107/craft3-eagerbeaver)

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

[](#installation)

To install Eager Beaver, follow these steps:

1. Download &amp; unzip the file and place the `eagerbeaver` directory into your `craft/plugins` directory
2. -OR- do a `git clone https://github.com/nystudio107/eagerbeaver.git` directly into your `craft/plugins` folder. You can then update it with `git pull`
3. -OR- install with Composer via `composer require nystudio107/eagerbeaver`
4. Install plugin in the Craft Control Panel under Settings &gt; Plugins
5. The plugin folder should be named `eagerbeaver` for Craft to see it. GitHub recently started appending `-master` (the branch name) to the name of the folder for zip file downloads.

Eager Beaver works on Craft 2.6.x.

Eager Beaver Overview
---------------------

[](#eager-beaver-overview)

Craft's [Eager-Loading Elements](https://craftcms.com/docs/templating/eager-loading-elements) allows you to nicely optimize your templates by telling Craft to load everything you need in one big query.

The only rub is that you can't specify this eager loading behavior for `entry`, `category`, or `product` elements that are auto-injected into your template.

Eager Beaver is a small plugin that allows you to eager load sub-elements like Assets, Categories, Users, etc. to these auto-injected elements.

This is especially useful if you have pages that use Matrix block "content builders", and thus will typically result in loading a number of relations like Assets contained in Matrix blocks to render a page.

Configuring Eager Beaver
------------------------

[](#configuring-eager-beaver)

There's nothing to configure.

Using Eager Beaver
------------------

[](#using-eager-beaver)

To use Eager Beaver, simply do something like:

```
{% do eagerLoadElements(entry, [
    'author.userPicture',
    'blogCategory',
    'blogImage',
    'blogContent.image:image'
]) %}

```

Or you can use the more verbose syntax to do the same thing:

```
{% do craft.eagerBeaver.eagerLoadElements(entry, [
    'author.userPicture',
    'blogCategory',
    'blogImage',
    'blogContent',
    'blogContent.image:image'
]) %}

```

The first parameter is the Element or array of Elements that you want to eager-load sub-elements into, such as an `entry`. If you pass in an array of Elements, they must all be the same type.

The second parameter is the same `with:` that you use for [Eager-Loading Elements](https://craftcms.com/docs/templating/eager-loading-elements), and uses the exact same syntax.

In the above example:

- `author` is a `User` that has an Assets field named `userPicture` added to it.
- `blogCategory` is a Category field
- `blogImage` is an Asset field
- `blogContent` is a Matrix field that has an Assets field named `image` added to the block type `image`

Eager Beaver Roadmap
--------------------

[](#eager-beaver-roadmap)

Some things to do, and ideas for potential features:

- Release it

Brought to you by [nystudio107](https://nystudio107.com/)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

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 ~2 days

Total

2

Last Release

3143d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7570798?v=4)[Andrew Welch](/maintainers/khalwat)[@khalwat](https://github.com/khalwat)

---

Top Contributors

[![khalwat](https://avatars.githubusercontent.com/u/7570798?v=4)](https://github.com/khalwat "khalwat (6 commits)")

---

Tags

craft-plugincraftcmseager-loadingelements

### Embed Badge

![Health badge](/badges/nystudio107-eagerbeaver/health.svg)

```
[![Health](https://phpackages.com/badges/nystudio107-eagerbeaver/health.svg)](https://phpackages.com/packages/nystudio107-eagerbeaver)
```

###  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)
