PHPackages                             hananils/kirby-type-methods - 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/kirby-type-methods

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

hananils/kirby-type-methods
===========================

Type Methods is a plugin for Kirby helping to identify the type of an object, either page, user or file, in order to simplify logic in snippets that – for instance – handle content from both $page and $user objects.

2.0.0(1y ago)543MITPHPPHP ^8.2

Since Nov 17Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/hananils/kirby-type-methods)[ Packagist](https://packagist.org/packages/hananils/kirby-type-methods)[ Docs](https://kirby.hananils.de/plugins/type-methods)[ RSS](/packages/hananils-kirby-type-methods/feed)WikiDiscussions main Synced today

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

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

**Type Methods** is a plugin for [Kirby](https://getkirby.com) helping to identify the type of an object, either page, user or file, in order to simplify logic in snippets that – for instance – handle content from both `$page` and `$user` objects.

Note

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

Examples
--------

[](#examples)

Think of site where you want to list members. Member information is either stored with the Kirby users (for admins) or on pages (for regular members). Given you have an array of all members, containing either user or page objects, type methods will help you to identify the source:

```

     ()

```

There is also a shortcut to check the given template or role respectively:

```
