# Is the kirby patterns plugin still a thing in Kirby 3?

**URL:** <https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444>\
**Category:** Questions\
**Tags:** v3\
**Created:** [January 24, 2019, 11:32pm UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444 "2019-01-24T23:32:42Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomasorus](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thomasorus/32/857_2.png) [@Thomasorus](https://forum.getkirby.com/u/Thomasorus)\
**Post date:** [January 24, 2019, 11:32pm UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/1 "2019-01-24T23:32:42Z")

</div>

Hi everyone, I’ve been a big user of the [patterns](https://github.com/getkirby-plugins/patterns-plugin) plugin for one of my previous kirby2 sites and I just realized I might be in trouble for migrating to kirby3 without it.

Even if the list of components via the /patterns url was fun and useful I can go without it to be honest. What I need to most is the `pattern()` function, as I was using a controller to fetch data and transfer it to my components.

I was wondering if a similar feature exists in Kirby 3 or if it’s possible to reproduce it in someway?

Thanks!

---

<div class="post-metadata">

**Author:** ![flokosiol](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/flokosiol/32/468_2.png) [@flokosiol](https://forum.getkirby.com/u/flokosiol)\
**Post date:** [January 25, 2019, 8:58am UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/2 "2019-01-25T08:58:10Z")

</div>

I heard it is as simple as renaming `patterns.php` to `index.php`. But I didn’t test it myself.

---

<div class="post-metadata">

**Author:** ![Thomasorus](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thomasorus/32/857_2.png) [@Thomasorus](https://forum.getkirby.com/u/Thomasorus)\
**Post date:** [January 25, 2019, 6:20pm UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/3 "2019-01-25T18:20:16Z")

</div>

I just tried renaming it but it doesn’t seem to work. When I don’t have the plugin I have the classic debugger saying to me that pattern() does not work. When I add the plugin and rename the patterns.php to index.php, my home shows me a blank page with a simple “Error” message in a h1, the rest of the dom is empty. Having the plugin activated also breaks language detection and all other pages.

---

<div class="post-metadata">

**Author:** ![mikefraser](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mikefraser/32/4431_2.png) [@mikefraser](https://forum.getkirby.com/u/mikefraser)\
**Post date:** [January 27, 2019, 11:16pm UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/4 "2019-01-27T23:16:21Z")

</div>

Hi, have you had any luck getting it to work? I think I’m having the same issues as you, any pointers welcome!

---

<div class="post-metadata">

**Author:** ![mikefraser](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mikefraser/32/4431_2.png) [@mikefraser](https://forum.getkirby.com/u/mikefraser)\
**Post date:** [January 28, 2019, 12:56am UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/5 "2019-01-28T00:56:07Z")

</div>

Apologies, I got my wires crossed. Renaming patterns.php to index.php has got the patterns() function working for me, but not the styleguide interface. I’m not sure if its affected the language detection for me, but I can view other pages.  
I’m getting the blank page with the h1, but I’m assuming that’s because I’m using the PlainKit? (thats the default template format).

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [January 28, 2019, 7:24am UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/6 "2019-01-28T07:24:06Z")

</div>

I don’t see how just renaming the main plugin file can possibly work, considering that the plugin uses for example, toolkit classes that no longer exists as well as some other stuff.

---

<div class="post-metadata">

**Author:** ![flokosiol](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/flokosiol/32/468_2.png) [@flokosiol](https://forum.getkirby.com/u/flokosiol)\
**Post date:** [January 28, 2019, 8:20am UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/7 "2019-01-28T08:20:29Z")

</div>

As I said, I didn’t test it myself, it was mentioned on Slack. Sorry for the confusion.

---

<div class="post-metadata">

**Author:** ![mikefraser](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mikefraser/32/4431_2.png) [@mikefraser](https://forum.getkirby.com/u/mikefraser)\
**Post date:** [January 28, 2019, 11:53am UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/8 "2019-01-28T11:53:24Z")

</div>

> I don’t see how just renaming the main plugin file can possibly work, considering that the plugin uses for example, toolkit classes that no longer exists as well as some other stuff.

Oh, ok. The patterns I’ve been testing it with are pretty basic (at the ‘atom’ level, outputting links / svg icons etc), but they are rendering. From what you’re saying, I’m guessing if I kept using it for more complicated components I’m going to run into problems. Thanks for the response.

---

<div class="post-metadata">

**Author:** ![Thomasorus](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thomasorus/32/857_2.png) [@Thomasorus](https://forum.getkirby.com/u/Thomasorus)\
**Post date:** [January 31, 2019, 11:11am UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/9 "2019-01-31T11:11:01Z")

</div>

On my side I just moved the patterns folder inside the snippet folder, converted the pattern() to snipper() and adjusted urls. It didn’t took a lot of time.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [January 31, 2019, 11:16am UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/10 "2019-01-31T11:16:05Z")

</div>

> [@Thomasorus](#):
>
> On my side I just moved the patterns folder inside the snippet folder, converted the pattern() to snipper() and adjusted urls. It didn’t took a lot of time.

That’s what I did as well with the project I’m currently porting. Advantage of the snippets: easier to debug than patterns, anyway.

---

<div class="post-metadata">

**Author:** ![crealistiques](https://avatars.discourse-cdn.com/v4/letter/c/9fc348/32.png) [@crealistiques](https://forum.getkirby.com/u/crealistiques)\
**Post date:** [March 27, 2019, 1:04am UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/11 "2019-03-27T01:04:22Z")

</div>

Hi there, I started to make the patterns plugin compatible with Kirby 3. It’s already working, but maybe I missed some details, haven’t tested all functionality yet. Have fun 😉

> **[crealistiques/patterns-plugin](https://github.com/crealistiques/patterns-plugin)**
>
> Kirby Patterns Plugin. Contribute to crealistiques/patterns-plugin development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Thomasorus](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thomasorus/32/857_2.png) [@Thomasorus](https://forum.getkirby.com/u/Thomasorus)\
**Post date:** [March 27, 2019, 11:08am UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/12 "2019-03-27T11:08:59Z")

</div>

Thanks!  
I already went to the snippet() road as I said, but I’m marking your answer as a solution!

---

<div class="post-metadata">

**Author:** ![crealistiques](https://avatars.discourse-cdn.com/v4/letter/c/9fc348/32.png) [@crealistiques](https://forum.getkirby.com/u/crealistiques)\
**Post date:** [March 27, 2019, 6:12pm UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/13 "2019-03-27T18:12:48Z")

</div>

Thank you!

Cheers

Steffen

---

<div class="post-metadata">

**Author:** ![o-o-o-o-o](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/o-o-o-o-o/32/5082_2.png) [@o-o-o-o-o](https://forum.getkirby.com/u/o-o-o-o-o)\
**Post date:** [January 22, 2021, 6:08am UTC](https://forum.getkirby.com/t/is-the-kirby-patterns-plugin-still-a-thing-in-kirby-3/12444/14 "2021-01-22T06:08:51Z")

</div>

Hi! I’m currently porting a kirby 2 project and was hoping this updated plugin could come in use –

It seems as though `$site` , `$pages`, `$page` are not available in the plugin?

They return null.
