PHPackages                             hananils/missing-link - 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. hananils/missing-link

Abandoned → [https://github.com/hananils/kirby-methods-folder](/?search=https%3A%2F%2Fgithub.com%2Fhananils%2Fkirby-methods-folder)Kirby-plugin[Utility &amp; Helpers](/categories/utility)

hananils/missing-link
=====================

Unlike collection and controllers, Kirby only allows for the creation of custom methods via plugins. Methods Folder bridges this gap by automatically registering methods located in site/methods. In additon to all methods types, it also provides a way to register helper functions via a dedicated file.

3.0.0(10mo ago)2531MITPHPPHP ^8.2

Since Jul 8Pushed 1w ago4 watchersCompare

[ Source](https://github.com/hananils/kirby-methods-folder)[ Packagist](https://packagist.org/packages/hananils/missing-link)[ Docs](https://kirby.hananils.de/plugins/methods-folder)[ RSS](/packages/hananils-missing-link/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (2)Versions (6)Used By (0)

[![Kirby Methods Folder](.github/title.png)](.github/title.png)

**Methods Folder** is a plugin for [Kirby](https://getkirby.com) to automatically register local methods provided in the folder `site/methods` just like Kirby accepts local collections, controllers or models without the need of writing a dedicated plugin.

Note

Please check out the online documentation at [kirby.hananils.de/plugins/methods-folder](https://kirby.hananils.de/plugins/methods-folder) for further information.

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

[](#installation)

### Download

[](#download)

Download and copy this repository to `/site/plugins/methods-folder`.

### Git submodule

[](#git-submodule)

```
git submodule add https://github.com/hananils/kirby-methods-folder.git site/plugins/methods-folder

```

### Composer

[](#composer)

```
composer require hananils/kirby-methods-folder

```

Creating custom methods
=======================

[](#creating-custom-methods)

After installing this plugin, you can create custom methods in `site/methods` by creating separate files for the different method types:

```
site
└ methods
  └ collection.php
  └ field.php
  └ block.php
  └ blocks.php
  └ layout.php
  └ layouts.php
  └ layout-column.php
  └ file.php
  └ files.php
  └ page.php
  └ pages.php
  └ site.php
  └ user.php
  └ users.php

```

Those files have to return an array:

```
